Global Mapper v25.0

SetPixelElevation to save time updating Elevation Grids

Osei
Osei Global Mapper UserTrusted User
edited April 2012 in SDK
Hi.
My elevation grid is quite big and I want to update only a few points in the elevation grid. At the moment, this means I have to close the previous layer and then recreate a new one with the updated points in them. I was thinking if a method existed that allowed me to set the elevation of individual grid points (say SetPixelElevation), then I could easily just change the elevation of grid points which will give the application a faster user response time during editing.

Is there such a method? In your view, what would be a quick way to edit elevation grids?

Thanks in advance.

Comments

  • global_mapper
    global_mapper Administrator
    edited April 2012
    There's not currently an edit method like that, so for now you would have to stick with what you are doing, or maybe break your large grid into a bunch of smaller tiles, that way you don't have so much to reload when you make a change. A simple SetPixelElevation is not possible for most elevation formats as the grids aren't all stored in memory but instead read from the original file on demand.

    However, if you use GM_CreateCustomElevGridLayer then you provide the memory buffer with the elevation values, so you can directly edit the values for the layer, then call GM_FlushLayerCache to clear any cached elements and have the raw memory buffer be checked again. This would work for what you want.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com