GM_GetPixelElevationRow vs DTED column-based scan lines?

jkenneallyjkenneally Global Mapper UserPosts: 53Trusted User
edited November 2012 in SDK

I have traditionally used your older GM_GetLocationElevation() call as a 'catch all' for loading elevation data. However, I'm in a situation now where I am guaranteed to be only loading DTED data files (i.e. not having to deal with potentially projected raster elevation, etc). However, I need to speed things up on the data loading side. As far as I can tell my two options are GM_GetPixelElevationRow() or GM_GetPixelElevation().

My main question here is around GM_GetPixelElevationRow(). Given that DTED uses column-major scan lines, is there any real benefit to using it over the per pixel reads (other than the overhead of fewer function calls)?

Just out of curiousity, is there any benefit to using GM_GetPixelElevation(), if I know my data is in geographic projection and I can use it directly based on pixel location/tile resolution?



  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited November 2012
    Either of the pixel-based calls will be faster as the coordinates don't have to be converted from ground coordinates to pixel coordinates. The GM_GetPixelElevationRow will be a lot faster for just grabbing all of the data from the layer as you avoid a bunch of function calls. The DTED data is column oriented so it might actually be faster to individually call GM_GetPixelElevation in column-major order rather than using GM_GetPixelElevationRow, but that's not definite. You might try both ways to see which is faster.

    Let me know if I can be of further assistance.


    Global Mapper Guru
Sign In or Register to comment.