GENERATE_ELEV_GRID

The GENERATE_ELEV_GRID command allows for the generation of a gridded elevation layer using loaded 3D vector data. The following parameters are supported by the command as well as the display option parameters supported by the IMPORT command.

  • FILENAME - filename of the layer(s) to grid. If an empty value is passed in, all loaded vector layers with 3D data will be gridded. This parameter can be listed more than once to specify multiple input files, like FILENAME="FILENAME_1" FILENAME="FILENAME_2". When running the script in the context of the main map view (including loading a workspace) you can also pass in the value 'USER CREATED FEATURES' to have the 'User Created Features' layer updated or 'SELECTED LAYERS' to have any layers selected in the Control Center gridded.
  • ELEV_UNITS - specify elevation units to use for new grid
    • FEET - US feet
    • DECIFEET - 10ths of US feet
    • METERS - meters
    • DECIMETERS - 10ths of meters
    • CENTIMETERS - centimeters
  • GRID_ALG - specify gridding algorithm to use
    • TIN - triangulate 3D data and grid it. This is the default and allows use of lines and areas as constraints.
    • BIN_MIN - uses the minimum value within a bin of size GRID_BIN_SIZE. Requires a Global Mapper Pro license . Lidar data will be binned, and 3D line an area features will be used as grid constraints/ break-lines.
    • BIN_AVG - uses the average value within a bin of size GRID_BIN_SIZE. Requires a Global Mapper Pro license . Lidar data will be binned, and 3D line an area features will be used as grid constraints/ break-lines.
    • BIN_MAX - uses the maximum value within a bin of size GRID_BIN_SIZE. Requires a Global Mapper Pro license. Lidar data will be binned, and 3D line an area features will be used as grid constraints/ break-lines.
  • SPATIAL_RES - specifies spacing of grid points to use in generated grid. A smaller grid spacing results in higher fidelity, but larger, elevation grids. Should be formatted as x_resolution,y_resolution. The units are the units of the current global projection. For example, if UTM was the current global projection and you wanted to use a grid with a 30 meter spacing, the parameter/ value pair would look like SPATIAL_RES=30.0,30.0. If you do not provide a SPATIAL_RES value, a good default for the input data will be chosen, so in most cases it is best just to leave this off.
  • SPATIAL_RES_METERS - specifies spatial resolution to use in meters. The value in meters will automatically be converted to the current view/ export projection units. For example, to do an export at 2.0 meter spacing (or as close as you can get to that in the current units), use SPATIAL_RES_METERS=2.0, or to do an export at 1.0 meters in X by 1.5 meters in Y, use SPATIAL_RES_METERS="1.0,1.5".
  • GRID_BIN_SIZE - if using a bin-based GRID_ALG for Lidar data this specifies how many native spacings in size to make each bin. For example a value of GRID_BIN_SIZE="3.0" would make each square bin 3 times the calculated native spacing of the point data. You can specify a bin size in meters by using the SPATIAL_RES_METERS parameter or a negative GRID_BIN_SIZE (like GRID_BIN_SIZE="-0.5" for 0.5 meter spacing.
  • LAYER_DESC - specifies the name to assign to this layer. If no layer description is provided, a default name will be assigned.
  • NO_DATA_DIST_MULT - specifies how far from an actual data point a grid cell has to be before it is treated as a no data value. This number is given as a multiple of the diagonal size of a single grid cell as nominally determined by the gridding algorithm or specified with the SPATIAL_RES parameter. A value of 0 (the default) means that all points should be considered as valid.
  • GRID_FILL_TO_BOUNDS - specifies that the grid values should be filled out to the entire bounds of the gridded data rather than just to the convex hull of the data being gridded. Use GRID_FILL_TO_BOUNDS=YES to enable this.
  • GRID_FLATTEN_AREAS - specifies that area features with elevation values should be flattened to the elevation of the area features. Use GRID_FLATTEN_AREAS=NO to disable this.
  • GRID_HEIGHTS_RELATIVE - specifies that the elevation values for the input vector features should be treated as relative to any loaded terrain data rather than as absolute elevation values. This useful for things like trees or buildings where you have a height above the ground rather than an absolute height. Use GRID_HEIGHTS_RELATIVE=YES to enable this.
  • GRID_SAVE_TIN - specifies that the triangulated irregular network (TIN) for the grid operation should be saved as a new separate vector layer consisting of triangular 3D area features. Use GRID_SAVE_TIN=YES to enable this.
  • GRID_USE_CONSTRAINTS - specifies that 3D line and area features should be treated as constraints (breaklines) during the gridding process. Use GRID_USE_CONSTRAINTS=YES to enable this. GRID_USE_CONSTRAINTS=NO will disable using 3D line and area features in the grid generation. The method for applying the constraints or breaklines depends on the GRID_ALG. The binning methods use a soft edge value of 2 samples.
  • GRID_IGNORE_ZERO - specifies that features with an elevation of 0.0 will not be used during the gridding process.
  • GRID_TIN_AREAS_ONLY - if enabled, all features that do not conform to TIN geometry (i.e. 3D triangles) will be ignored. Use GRID_TIN_AREAS_ONLY=YES to enable.
  • GRID_TYPE - specifies what values should be gridded for a bin-based grid. The following values are supported:
    • ELEVATION - default, grids the elevation values for each point
    • INTENSITY - grids the intensity value for each point
    • HEIGHT_ABOVE_GROUND - grids the height above ground for each point
    • NDVI - grids the calculate NDVI (normalized difference vegetation index) for 4-band (RGB+NIR) Lidar points
    • NDWI - grids the calculate NDWI (normalized difference water index) for 4-band (RGB+NIR) Lidar points
    • CLASS - grids the classification code of the Lidar points. The classification type that occurs the most in each cell is used, with unknown / unclassified types only being used if no known types are found.

  • CREATE_IMAGE - specifies whether a Lidar bin grid should be created as an image rather than a grid layer. Use CREATE_IMAGE=YES to create an image if possible, or CREATE_IMAGE=NO to create a grid. This is only applicable to the GRID_TYPE values that make sense as either a grid or image (i.e. INTENSITY, SCAN_ANGLE, etc.)