Export of .gmg Elevation Grids: Resampling bug

sonnysonny Global Mapper UserPosts: 28Trusted User

I think I probably found a bug if working with .gmg Elevation grid files and exporting them using resampling into another grid spacing.

I'm opening a .gmg Elevation grid file and exporting it via "Export Elevation Grid format" into a new Elevation file (for example Global Mapper Grid or GeoTIFF). I want to downsample the source file by a factor of 10 using Bilinear resampling.
example: source file = 10 x 10 meter samples, exported file = 100 x 100 meter samples.
No reprojection takes place, since projection source file = projection exported file.

Since the center of each elevation pixel of the exported grid is exactly at the locaction of the center of an elevation pixel of the source file, both elevation values should be exactly the same. No matter if i'm using "nearest neighbor", "bilinear" or "bicubic" interpolation. In the case of "bilinear" or "bicubic" the value should just differ if both pixel's center's are not exactly at the identical location, for example if a reprojection took place.

But GM by mistake creates new, artificial values for that exported grid pixels. Not only differnet but also wrong. Meaning the elevation value of the 100 x 100 grid is sometimes far different from the values of the underlying 10 x 10 grid.

What I noticed:
  • problem just occurs if resampling factor is >= 6 (e.g. source = 10m grid, export = 60 m grid). If exporting with a factor <= 5 (e.g. source = 10m, export = 50m grid) than there's no problem, elevation value's stay the same as in the source file.
  • just if source file is a .gmg-file. No problem if source file is GeoTIFF or other. Problem independed of fileformat of exported file.
  • problem just occurs if using resample methods "bilinear" and "bicubic". Not if using "Nearest neighbor"
Sign In or Register to comment.