EDIT_LIDAR

The EDIT_LIDAR command provides a way to modify loaded Lidar point clouds. Lidar points can be reclassified and marked as deleted, or moved to a new layer. The Lidar points to work on can be specified by a bounding box or by proximity to other loaded Lidar and/or line features.

The following parameters specify how to define the Lidar points to search:

  • FILENAME - filename of the Lidar layer to update. If an empty value is passed in, all loaded Lidar layers will be updated. 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 updated.
  • LIDAR_FILTER_NAME - specify name of filter previously defined with DEFINE_LIDAR_FILTER command to apply to Lidar points to get list of points to search

The following parameters allow doing a proximity search near other loaded Lidar points or line features. If no proximity search is specified, all Lidar points in the specified bounds will be operated on:

  • MAX_DIST - specifies the maximum distance (in meters) that a Lidar point can be from the nearest matching Lidar point or 3D line and still be part of the set of Lidar points to modify.
  • USE_3D_DIST - specifies whether the MAX_DIST allowed is a full 3D distance from the Lidar point to the other Lidar point or line, or if only a 2D distance search will be done. By default a 3D search is done. Add USE_3D_DIST="NO" to use only a 2D (top-down) search.
  • FILENAME_NEAR - filename of the Lidar and/or line layer(s) to search near if MAX_DIST is provided. If no value is provided, the layer(s) specified with FILENAME are used.
  • LIDAR_FILTER_NEAR_NAME - specify name of filter previously defined with DEFINE_LIDAR_FILTER command to apply to the Lidar points search near to get the actual set of Lidar points to search near

The following parameters specify what to do to the matching Lidar points, such as reclassifying them or marking them as deleted:

  • LIDAR_CLASS - specifies the name of the Lidar class to apply to all matching Lidar points. This can either be the Lidar class number or the name of the Lidar class displayed in the user interface. For example, to set all points to type 2 (ground), use LIDAR_CLASS=2 or LIDAR_CLASS="Ground". This option requires a Global Mapper Pro license.
  • DELETE_FEATURES - specifies whether or not to mark all matching features as deleted. Use DELETE_FEATURES=YES to enable.
  • NEW_LAYER_NAME - Indicates the name of the layer where the matching Lidar points will be copied to. A new layer is always created, even if there is already a layer loaded with the specified name.
  • NEW_LAYER_PROJ - special Projection Specification indicating the projection to be used in the new layer. If this parameter is not specified, then the new layer will use the native projection of the matching points (if all the same), or the current global projection.

SAMPLE

// Define a Lidar filter for all points
DEFINE_LIDAR_FILTER NAME="LidarFilter_Vegetation" LIDAR_FILTER="3,4,5"
DEFINE_LIDAR_FILTER NAME="LidarFilter_Building" LIDAR_FILTER="6"

// Move all vegetation points within 2 meter of building points to new layer (mark as deleted in original layer)
EDIT_LIDAR FILENAME="*" LIDAR_FILTER_NAME="LidarFilter_Vegetation" \
NEW_LAYER_NAME="Veg within 2m of Building" DELETE_FEATURES="YES" \
LIDAR_FILTER_NEAR_NAME="LidarFilter_Building" MAX_DIST="2.0" USE_3D_DIST="YES"