Maximum elevation multiple DEMs

JeffJeff Global Mapper UserPosts: 2
edited October 2008 in SDK
Hi all,

I'm using the GM SDK as part of a mission planning application. The problem I'm running into at the moment is when I load a DEM, then start a new mission plan (thus clearing out the old DEM), and load a new DEM.

I suspect that GM is storing the minimum/maximum elevation of the first loaded DEM somewhere as the second loaded DEM is being shaded as if the maximum elevation is that of the first DEM. This only seems to happen if the first DEM loaded has a higher maximum elevation than the second.

Just to be sure I'm clear, using our application and the GM SDK we:
1. Load a DEM and display it.
2. Start a new mission plan (this clears out the areas and points that we added to some custom layers and clears our bitmap that we draw the DEM to to display it).
3. Load a second (lower elevation) DEM. This DEM is shaded as if it is lower elevation (that is to say, the colouring is shifted toward blue) than if it were to be loaded without first loading the higher elevation DEM.

Any help would be ... helpful. :)

Thanks in advance,

Jeff

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited October 2008
    Jeff,

    Are you calling GM_CloseLayer to close out your first DEM? If not, then when you load the second DEM they will both be shaded using the combined min/max range of the 2 DEMs so that you will get a seamless view when viewing the DEMs together. If you close the other DEM before loading the second you should get just the elevation range for the second used for coloring.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • JeffJeff Global Mapper User Posts: 2
    edited October 2008
    Mike,

    Thanks very much for your prompt reply. When I read your response I thought "of course I'm calling CloseLayer", but it turns out I was closing ever layer except the DEM layer. It works great now.

    Thanks again!

    Jeff
Sign In or Register to comment.