GENERATE_ELEV_GRID - Different results from script command and manual grid generating
Hello.
I am pretty new in Global Mapper. I have an issue with grid generated from LAS data. If I use the command in user interface, the GMG result is ok, if I use the script command the elevation values in GMG are rounded to whole meters. See my screenshots below. Is there a way how to specify same behavior of the script as in the user interface command?
Thank you for help.
Michal Becicka

Answers
-
Here is also the loop in my script which generates GMGs:
DIR_LOOP_START DIRECTORY="%UTM_Tiles_Dir%shp_export\tiles\" FILENAME_MASKS="*.shp"
DEFINE_VAR NAME="Tile" VALUE="%FNAME_W_DIR%" TYPE="SHAPEFILE"
IMPORT FILENAME="%Tile%"EXPORT_VECTOR FILENAME="%UTM_Tiles_Dir%shp_export\points\UTM_Tilename.shp" EXPORT_LAYER="%UTM_Tiles_Dir%shp_export\points\UTM_Points.shp" LAYER_BOUNDS="%Tile%" \
TYPE=SHAPEFILE SHAPE_TYPE=POINTS GEN_PRJ_FILE=YES OVERWRITE_EXISTING=YES
IMPORT FILENAME="%UTM_Tiles_Dir%shp_export\points\UTM_Tilename.shp"DEFINE_VAR NAME="UTM_Tile" VALUE_ATTR="<Feature Name>" FILENAME="%UTM_Tiles_Dir%shp_export\points\UTM_Tilename.shp"
//*Use of the Resolution*
GENERATE_ELEV_GRID ELEV_UNITS=METERS SPATIAL_RES_METERS=2.0 LAYER_BOUNDS="%Tile%" LAYER_BOUNDS_EXPAND="200" LAYER_DESC="Temp_Grid"//*Use of the Result Name*
EXPORT_ELEVATION FILENAME="%GMG_Directory%las2gmg_output\Ground_2M_Grid_0%UTM_Tile%.GMG" TYPE=GLOBAL_MAPPER_GRID ELEV_UNITS=METERSUNLOAD_LAYER FILENAME="%Tile%"
UNLOAD_LAYER FILENAME="Temp_Grid"
UNLOAD_LAYER FILENAME="%UTM_Tiles_Dir%shp_export\points\UTM_Tilename.shp"DIR_LOOP_END
-
Hello,
The Global Mapper Grid format stores elevation values as whole numbers, not fractional numbers, so you should use ELEV_UNITS=CENTIMETERS (or MILLIMETERS, if you need more precision) instead of METERS.
Cheers,
Bob -
Thank you for the answer.
I was trying to use centimeters before but the result was 100x lower elevation than it should be (see the screenshot - the elevation should be from 550m to 850m not 5.5m to 8.5m). I thought I can't use the centimeters because the script loads the LAS data which are in meters and assumes that these numbers are centimeters. What I am thinking wrong about?
Michal
-
I was playing with units and Bob is right. I just had to delete units in the command GENERATE_ELEV_GRID so now it works:
GENERATE_ELEV_GRID SPATIAL_RES_METERS=2.0 LAYER_BOUNDS="%Tile%" LAYER_DESC="Temp_Grid"
EXPORT_ELEVATION FILENAME="%My_grid%" TYPE=GLOBAL_MAPPER_GRID ELEV_UNITS=CENTIMETERThank you.
Michal
Categories
- 12.5K All Categories
- 5.5K Features Discussion
- 314 Downloading Imagery
- 1.3K Elevation Data
- 377 Georeferencing Imagery Discussion
- 611 GM Script Language
- 50 User Scripts
- 112 GPS Features
- 397 Projection Questions
- 803 Raster Data
- 1.3K Vector Data
- 6.5K Support
- 161 Announcement and News
- 893 Bug Report
- 557 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 542 Other Discussion
- 128 GIS Data Sources
- 26 Global Mapper Showcase
- 229 How I use Global Mapper
- 104 Global Mapper Forum Website