Global Mapper v25.0

Creating a Raster Import Plugin with custom projection

Hello, I have a question concerning the creation of a custom raster import plugin.

The raster format I would like to import is a proprietary format which has the unfortunate complication of being in a completely non-standard projection.  In the past we have successfully written our own software to convert this proprietary format into GeoTIFF by transferring the proprietary image buffers into GeoTIFF and then embedding a net of a large number of Geographic Tie Points into the GeoTIFF files. This resulted in a set of GeoTIFF files which were correctly geo-referenced and consumable by the Global Mapper application.

I would like to take the next step of implementing a Raster/Elevation Import Plugin for my format so as to eliminate the current "convert to GeoTIFF first" mechanism for getting our data into Global Mapper. I am having a bit of trouble determining whether or not it is possible to define a grid of Tie Points when implementing the bool getProjection( GM_Projection_t& aProj ) method within the import plugin. 

Hopefully I have have made my intent clear, I apologize of I have not.
Can anyone provide any insight into how I might accomplish my goal?

Thanks,
Bruce

Answers

  • bjones
    edited November 2016
    Also, I have noticed the GM_RepositionLayer() method in the SDK which deals with ground control points. It is not immediately clear to me that this is useful within the context of a raster import plugin however. Perhaps I could call the GM_RepositionLayer() method from withing the raster plugin renderFinished() method?

    Thanks.
  • bjones
    Answer ✓
    I think I have this figured out. I created my custom raster plugin which returns the image and indicates a Geographic projection. The image is not initially geo-referenced correctly due to the lack of Ground Control Points. I then created an SDK extension which hooks into the HandleGMEvent and waits for GM_Event_OverlayLoaded, when one of our images has been loaded I create the Ground Control Points and call GM_RepositionLayer(). This two step process seems to work fine.