Global Mapper v26.0

DEM grid data and interpolation

Osei
Osei Global Mapper UserTrusted User
edited July 2008 in SDK
I would like to know how I can get access to the pointgrid data in a DEM layer.

Example. there may be elevations at 1201 by 1201 points used to generate the grid layer. I would like to get access to the 1201 by 1201 points and the elevation at each point.

i would also like to know what interpolation algorithm is used to generate the layer. say linear, non-linear etc.

Thanks

Comments

  • global_mapper
    global_mapper Administrator
    edited June 2008
    With the SDK you can use the GM_GetPixelElevation function to query the elevation value for each pixel location. The GM_GetLocationElevation function allows you to query elevation values based on a ground rather than pixel coordinate.

    If you access a location not on a grid cell center, by default bilinear interpolation is used to determine the value at the specified location.

    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 2008
    Thanks a lot for the initial response. However, I am still not clear on the GetPixelElevation thing. As in earlier example, if there are 1201 by 1201 points separated by 50m in both directions and the start point is (100,100),if I say GetPixelElevation(1,2), does that get me the elevation at the ground coordinate point [100 + (1*50),100 + (2*50)].

    Is there a way for me to know the number of columns and rows. ie 1201 x 1201, the start point and the resolution? If I can get these, I can work out the rest myself.

    Thanks in advance.
  • Osei
    Osei Global Mapper User Trusted User
    edited July 2008
    Got it. Says at least 10 characters so...