Global Mapper v25.0

missing explanations of Global Mapper Grid Export Options

Greina
Greina Global Mapper UserTrusted User
edited January 2012 in Elevation Data
Mike,
I would like to convert some ASTER GDEM files into GlobalMappers gmg format. Therefore I have to decide about the vertical unit, which shows up in the Global Mapper Grid Export Options. What do I have to choose to keep the same quality? What happens if I change from e.g. centimeter to meters?

What is the difference between lossless and not lossless in quality and file size?

Maybe it could be a good idea to add the information to your help files?!

Comments

  • global_mapper
    global_mapper Administrator
    edited January 2012
    The GMG format rounds elevation values to the nearest whole number to allow good compression, do make sure to choose an elevation unit that is precise enough for the precision of your source data. For ASTER GDEM decimeters should be more than adequate and centimeters would be overkill.

    Using non-lossless will lose a bit of precision, but really not that significant. However it doesn't make the files that much smaller either. For ASTER GDEM the lossy setting with decimeters should still maintain the original data within the precision of that data, so I would go with that.

    Thanks,

    Mike
    Global Mapper Guru
    gmsupport@bluemarblegeo.com
    http://www.globalmapper.com
  • Greina
    Greina Global Mapper User Trusted User
    edited January 2012
    Thank you.
    I just exported one zip file to gmg file format.
    I loaded both files and zoomed in very far so that I can see the steps (e.g. at coastline). Comparing the original (zip) file and the gmg shows differences in the vertical figures:
    zip files usually show full meters, e.g. 4m, 5m, 6m, those values vary only when changing the pixel
    gmg files usually shows interpolated values, e.g. 3,872m, 3,956m, 4,102m ..., those values vary with every movement of the mouse!
    Why?
    Is there any chance to export a 1:1 copy of the original data?
    Where can I tell GM to only show full meters instead of decimal values?
  • global_mapper
    global_mapper Administrator
    edited January 2012
    Try turning off resampling for the layer on the Options dialog of the Control Center. By default elevation layers (like GMG) will use bilinear interpolation so unless you are exactly at a grid cell center you will see values like that. Also GMG files have embedded overview layers at powers of 2 less resolution with averaged values for very fast viewing of huge data sets at low zoom ranges. Unless you are zoomed all the way in you could be seeing elevations from that and since they are averages of blocks of data from lower zoom levels they might not be integers even if the max zoom level is since they will be averages. For example in the overview layer at 1/4th resolution of the original data each sample will be an average of the 16 samples inside the lower resolution grid cell from the highest resolution layer.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
  • Greina
    Greina Global Mapper User Trusted User
    edited January 2012
    Mike, I switched to nearest neighbour and exported the ASTER GDEM zip file to gmg and to GeoTIFF. There is no change with gmg. But TIFF export came out fine: It is the same as the original.
  • global_mapper
    global_mapper Administrator
    edited January 2012
    Are there differences when zoomed all the way in on the GMG or just when zoomed out, when the averaged overview layers are being displayed and used for cursor reporting? The TIFF export does not generate overview layers so you would always be sampling from the full detail layer there. Also did you use lossless or lossy GMG export?

    Thanks,

    Mike
  • Greina
    Greina Global Mapper User Trusted User
    edited January 2012
    I only speak about when fully zoomed in! ( I see the steps)

    There is no difference in lossless or not.
  • global_mapper
    global_mapper Administrator
    edited January 2012
    Hmmm that is strange if lossless was checked and your output units were the same as the input elevation units and the input data had nearest neighbor resampling enabled. What format is the input ASTER data in?

    Thanks,

    Mike
  • Greina
    Greina Global Mapper User Trusted User
    edited January 2012
    It is TIFF packed in zip. I sent a sample to your FTP server!
  • global_mapper
    global_mapper Administrator
    edited January 2012
    I looked at your files. The TIFF and GMG are identical. If I turn them both to nearest neighbor resampling after loading they are identical. I also used File->Combine Terrain to do a subtraction and all samples resulting were 0, so no differences anywhere. Did you have the resampling set to nearest neighbor after reloading the GMG file?

    Thanks,

    Mike
  • Greina
    Greina Global Mapper User Trusted User
    edited January 2012
    Yes, you are right. I exported the zip to gmg with "Nearest Neighbor (None)". I loaded the gmg and zoomed in. Unfortunately GM loads it again with default "Bilinear Interpolation". This is for me a little bit confusing and not very logical, as GM loads every other file with "Nearest Neighbor (None)". Is there a specific reason for this default or better: Could you change it to "Nearest Neighbor (None)"???

    Another subject are the vertical units:
    With "Nearest Neighbor (None)" switched on I can see that the ASTER GDEM files saves within every single pixel one integer value in meters, e.g. 2143 Meter. So for me it is the best to save the ASTER GDEM files with vertical units switched to meters and not to decimetres which was your recommendation in Post 2.
    Saving in decimetres lets the file size increase and values will vary from the original values. What do you think on that??
  • global_mapper
    global_mapper Administrator
    edited January 2012
    The defaults in Global Mapper have always been Nearest Neighbor for image files and Bilinear Interpolation for terrain files as terrain files look much better with bilinear interpolation usually and are normally of much lower resolution than image files, so you want to smooth them. You can turn this off if you want in the Advanced section of the General tab of the Configuration dialog.

    Yes for low vertical resolution data sets like ASTER GDEM you will be fine with just meters for your export units. Using decimeters will make the files slightly larger and if you have resampling enabled and your export doesn't perfectly align with the original will give you different results, however the differences would be well below the error of the data set, so really it only costs you the disk space if you accidentally leave it at decimeters. You aren't losing anything by getting resampled values stored when you are off-center of the original samples, in fact it is easier to get the original back if you do that then storing the completely shifted original meter values.

    Thanks,

    Mike
  • Greina
    Greina Global Mapper User Trusted User
    edited January 2012
    Great, thanks for your in-depth research!

    In ASTER GDEM zip I find two TIFF-files:
    e.g.
    ASTGTM2_N69E018_dem.tif
    ASTGTM2_N69E018_num.tif

    Does GlobalMapper need them both? And what for?
  • global_mapper
    global_mapper Administrator
    edited January 2012
    I think just the _dem.tif is needed. I think the other is some metadata file showing the source of the data or something like that.

    Thanks,

    Mike