Side remnant effects when two grid layers are loaded

Osei
Osei Global Mapper UserTrusted User
edited July 2009 in SDK
I have just noticed a small problem with the drawing of more than one grid layer. When I have two grid layers and I turn one off, some of the edges that actually belong to the turned off layer still remain.

Please find attached, 2 grid text files.

I load the two of them into GM9. When I turn off demo.txt (which is the bigger grid layer), I sometimes get remnants of the layer with demo sf.txt. I export to a gmp file and then open a new instance of GM9 and load the exported gmp file. I then turn off the bigger grid again and I still see the remnant edge as seen in demo.jpg.

I am sometimes able to get rid of some of the edge. I therefore believe there must be some refresh or erase procedure I can use to fix this problem and would be glad if you could point me in that direction.

Thanks in advance and have a great weekend.

Comments

  • global_mapper
    global_mapper Administrator
    edited July 2009
    What's happening is that when the larger layer is loaded the small one tries to interpolate the edges with the underlying layer to smooth the transition (doesn't work well here because the values are so different). If you disable interpolation for the topmost layer then that edge should go away.

    Another option is to check the option to 'Ignore Zero Elevations' when generating the grid from the smaller layer as it has a bunch of zero values around the edges that I'm guessing are void values. I can't remember if this option is in v9.xx though.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • Osei
    Osei Global Mapper User Trusted User
    edited July 2009
    I am using the SDK [131] and the problem I am having can be shown in the two images attached and the problem is very pronounced. Can I turn off interpolation for a grid layer during creation? I am using the GM_CreateCustomElevGridLayer function to create my grid layers.

    The problem is not creating the grid, but exporting the package and reloading.

    Please help me fix this problem. Thanks a mill in advance.
  • global_mapper
    global_mapper Administrator
    edited July 2009
    You can turn off interpolation for the grid layer by calling GM_SetRasterDisplayOptions and turning off the mInterpolatePixels value in the GM_RasterDisplayOptions_t structure.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com