Export Elevation Writing large amounts of unnessesary data
Nate
Global Mapper User
What I am trying to do is take in numerous elevation data files and export them as a single larger one. Due to the scale of the operation I need to do it in a batch process using a script to specify the specific boundaries for each export file.
My issue is that some of these border tiles stretch into Canada for which we have no data, but when the script goes to export the elevation for that region it will write "no data" values in for the part of the region outside the US instead of creating a smaller file. What I end up with is a 10GB gridfloat file that is mostly no data. Is there anything I am missing in the script that will reduce the size of these files?
GLOBAL_MAPPER_SCRIPT VERSION=1.00
UNLOAD_ALL
DIR_LOOP_START DIRECTORY="\\Amiens\Maps\Minnesota\Cut\Borders\Google Maps Zoom Level 6 Tiles" FILENAME_MASKS="*.shp" RECURSE_DIR=NO HIDDEN=YES
DIR_LOOP_END
My issue is that some of these border tiles stretch into Canada for which we have no data, but when the script goes to export the elevation for that region it will write "no data" values in for the part of the region outside the US instead of creating a smaller file. What I end up with is a 10GB gridfloat file that is mostly no data. Is there anything I am missing in the script that will reduce the size of these files?
GLOBAL_MAPPER_SCRIPT VERSION=1.00
UNLOAD_ALL
DIR_LOOP_START DIRECTORY="\\Amiens\Maps\Minnesota\Cut\Borders\Google Maps Zoom Level 6 Tiles" FILENAME_MASKS="*.shp" RECURSE_DIR=NO HIDDEN=YES
// IMPORT A SHAPE FILE
//IMPORT FILENAME="%FNAME_W_DIR%" HIDDEN=YES
EMBED_SCRIPT FILENAME="\\amiens\Maps\Scripts\Z6 NED Import Scripts\%FNAME_WO_EXT%.gms"
EXPORT_ELEVATION FILENAME="G:\Map Data\Cut MN Elevation\Z6_%FNAME_WO_EXT%.flt" TYPE=FLOATGRID ELEV_UNITS=METERS POLYGON_CROP_FILE="%FNAME_W_DIR%" OVERWRITE_EXISTING=NO FILL_GAPS=NO
UNLOAD_ALL//IMPORT FILENAME="%FNAME_W_DIR%" HIDDEN=YES
EMBED_SCRIPT FILENAME="\\amiens\Maps\Scripts\Z6 NED Import Scripts\%FNAME_WO_EXT%.gms"
EXPORT_ELEVATION FILENAME="G:\Map Data\Cut MN Elevation\Z6_%FNAME_WO_EXT%.flt" TYPE=FLOATGRID ELEV_UNITS=METERS POLYGON_CROP_FILE="%FNAME_W_DIR%" OVERWRITE_EXISTING=NO FILL_GAPS=NO
DIR_LOOP_END
Comments
-
Unless you explicitly specify the bounds that you want to use the export will by default use the full bounds of the loaded data. So if that data specifies that it goes well into Canada, even if everything in Canada is marked as 'no data', the export will keep the original extents of the import data.
If possible you could cut your original data to the Canadian border, then your batch conversion would work properly.
Another option would be to use a compressed elevation format, like Global Mapper Grid, so while those large no-data areas would still be present they would take up hardly any space as they would compress away to almost nothing.
Let me know if I can be of further assistance.
Thanks,
Mike
Global Mapper Support
support@globalmapper.com
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website