Filling gaps in grid via script
I'm having trouble trying to get GM 18.2 to fill gaps in this data. I load a lidar point cloud in and grid it (along with a bounding shapefile, with hydroflattening to be added later), but even with 'FILL_GAPS' activated I still get all these gaps in the final product.
If I do it manually I can move the 'slider' all the way over to loose and it will fill them, but is there a way to do this via script?
Script is as follows:
//LiDAR file folder define
DEFINE_VAR NAME=LIDAR VALUE="D:\3_DEM"
DIR_LOOP_START DIRECTORY="%LIDAR%" FILENAME_MASKS="*.laz" RECURSE_DIR=NO
IMPORT FILENAME="%DIR%%FNAME_WO_EXT%.laz" TYPE="LIDAR_LAS" LIDAR_FILTER="NONE,2" LIDAR_RETURN_FILTER="NONE,3"
IMPORT FILENAME="%DIR%%FNAME_WO_EXT%.shp" TYPE="SHAPEFILE"
// GENERATE_ELEV_GRID ELEV_UNITS=METERS SPATIAL_RES_METERS=1.0 GRID_FLATTEN_AREAS=YES LAYER_BOUNDS=%FNAME_W_DIR% GRID_FILL_TO_BOUNDS=YES
GENERATE_ELEV_GRID ELEV_UNITS=METERS GRID_ALG=BIN_MIN SPATIAL_RES_METERS=1.0 GRID_FLATTEN_AREAS=YES LAYER_BOUNDS=%FNAME_W_DIR% GRID_FILL_TO_BOUNDS=YES
EXPORT_ELEVATION FILENAME="D:\2_Classification_In_Progress\1m_GRID\%FNAME_WO_EXT%.dem" EXPORT_LAYER="GENERATED ELEVATION GRID" \
TYPE=USGS_DEM ELEV_UNITS=CENTIMETERS SPATIAL_RES_METERS=1.0 GEN_PRJ_FILE=YES LAYER_BOUNDS="%DIR%%FNAME_WO_EXT%.shp" FILL_GAPS=YES
UNLOAD_LAYER FILENAME="%DIR%%FNAME_WO_EXT%.laz"
UNLOAD_LAYER FILENAME="%DIR%%FNAME_WO_EXT%.shp"
UNLOAD_LAYER FILENAME="GENERATED ELEVATION GRID"
DIR_LOOP_END
Answers
-
I seem to have answered my own question, if I use the TIN method instead of BIN, it seems to fill all gaps
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 627 GM Script Language
- 52 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