Global Mapper v24.1

Export Elevation Data using SDK with Nearest Neighbor Sampling

I was wondering if there was a way to specify the resampling algorithm when exporting elevation data using the SDK. I can do it using the GUI application, but the only option I can see in the documentation regarding resampling or interpolation deals with the layer properties.


  • bmg_mike
    bmg_mike Global Mapper Guru Moderator, Trusted User

    There is not currently a way to specify non-default export resampling in the SDK, but I have made todo item GMSDK-285 to add this functionality, likely for the next release. What you could do now is spin through all loaded layers and explicitly set the resampling method for each layer to what you want for the export, then that method should be what is used as the export will detect the layer is using a non-default resampling method already.



    Global Mapper Guru

  • The only way I see for setting anything with regards to interpolation is the "GM_DrawFlags_NoAutoInterpolation" flag in the DrawFlags. Is that what I set?

  • bmg_mike
    bmg_mike Global Mapper Guru Moderator, Trusted User
    Answer ✓

    You would use GM_GetRasterDisplayOptions to get the current settings for the layer, then change the mSamplingMethod for the layer, then call GM_SetRasterDisplayOptions to update the sampling method for the layer.