LIDAR_COMPARE

The LIDAR_COMPARE command supports the functionality of the Compare Point Cloud, Lidar QC tool and the Find Duplicate Lidar tools. You can identify Lidar points that are different between 2 sets of point clouds or compare the elevations from loaded Lidar point clouds to loaded 3D control points. You can also adjust the Lidar points to match the control points. This command also supports deletion of duplicate points. The following parameters are supported by the command:

  • FILENAME - filename or description of loaded layer(s) of Lidar point clouds to compare to control point(s). This parameter can be listed more than once to specify multiple input files, like FILENAME="FILENAME_1" FILENAME="FILENAME_2". If not specified all loaded Lidar clouds will be used.
  • FILENAME2 - if provided, a comparison between the two sets of point clouds is done. The FILENAME2 parameter specifies the filename or description of loaded layer(s) of Lidar point clouds to compare to the layer(s) specified with the FILENAME parameter. This parameter can be listed more than once to specify multiple input files, like FILENAME2="FILENAME_1" FILENAME2="FILENAME_2".
  • POINT_FILENAME - filename or description of loaded layer(s) with the 3D control point features. If not specified all loaded 3D point features will be used.
  • REPORT_FILENAME - if specified, the name of the text file (CSV format) to save a report to with each control point listed, along with information about the elevation difference at the point, the overall RMSE in meters, and a text reporting of the difference metrics. When recording the Lidar QC tool with the Script Builder, the REPORT_FILENAME parameter will be added and automatically filled with the specified filepath if a report file was specified.
  • LAYER_DESC - specifies the description to use for the layer created when comparing point clouds. The new layer will contain the points that are different.
  • MAX_SEARCH_BIN_MULT - If comparing point clouds, this specifies the maximum distance a point in the FILENAME2 cloud(s) can be from a point in the FILENAME cloud(s) before it is considered a new point. If comparing to control points, this specifies the maximum distance from each control point to look for Lidar to get the Lidar point cloud height. This is a multiple of the native point spacing of the cloud. A negative value indicates the distance in meters (like MAX_SEARCH_BIN_MULT=-0.5 for a 0.5m search distance).
  • MAX_POINT_COUNT - specifies the maximum number of points to consider in the point cloud for getting the height at each location. A value of 0 means that only the search distance is considered. Otherwise, to just consider the 3 nearest points within the search radius, use MAX_POINT_COUNT=3.
  • FIT_POINTS - if FIT_POINTS=YES is provided, the elevation of the Lidar points will be adjusted to match the control point elevations. When recording the Lidar QC tool with the Script Builder, FIT_POINTS=YES will be added if “Fit Lidar to Control Points” was run.
    • ADJUST_TYPE - specifies the type of adjustment to apply to the cloud point.

    • FIXED_SHIFT (or FIXED_SHIFT_Z) - adjusts the cloud point locations by a fixed amount supplied by either the XYZ_SHIFT or Z_SHIFT parameters. If neither the XYZ_SHIFT nor Z_SHIFT parameter are provided, the average shift between the control point and associated cloud locations are used for the shift.

    • BEST_FIT (or BEST_FIT_PLANE) - performs a best-fit adjustment between the cloud and the control points. If explicit 3D associated points are not provided, then just a best-fit-plane for the Z offsets is used to adjust the Z values of the cloud points. If explicit 3D associated points are provided, then a full best-fit 3D transform is calculated and applied

    • PIECEWISE_AFFINE - performs a piecewise-affine (triangulated) adjustment to the Z values in the cloud. This should preserve the exact Z offset at each control point location and interpolate in between control points

    • Z_SHIFT - specifies the offset to apply to the Z coordinate of each point in the cloud if ADJUST_TYPE=”FIXED_SHIFT” is used. The value will be in meters unless you explicitly include units (like Z_SHIFT=”1.3 ft”).

    • XYZ_SHIFT - specifies the offset to apply to the X, Y, and Z coordinates of each point in the cloud if ADJUST_TYPE=”FIXED_SHIFT” is used. This should be a comma-separated list of 3 values, optionally followed by units. The value will be in meters unless you explicitly include units (like XYZ_SHIFT=”0.2, -0.5, 1.3 ft”).

    • ASSOC_POS - specifies a 3D position associated with the nearest control point. This will be used to calculate offsets for the adjustment. A separate ASSOC_POS parameter should be provided for each known associated position. Note that you do not have to provide an ASSOC_POS for every control point. The format is a comma-separated listed of X, Y, Z coordinates. The Z coordinate should be in meters. The XY location will be in the projection specified by ASSOC_POS_PROJ, or in the current projection if that is not provided.

    • ASSOC_POS_PROJ - specifies the projection that the ASSOC_POS parameters are supplied in. See the definition of the PROJ parameter for the IMPORT command for details.

  • COMPARE_BOTH_DIRS - if COMPARE_BOTH_DIRS=YES is provided, it will enable the option to "Include Points From Both Point Cloud Sets Not In the Other" which enables the Reference to Source comparison to be generated in addition to the Source to Reference comparison.
  • DIFFERENCE_REPORT_WINDOWS - if DIFFERENCE_REPORT_WINDOW =YES is provided, it will enable the creation of a Difference Report that will open in 3 windows
  • DELETE_ORIGINALS - when set with the DELETE_DUPLICATES option also enabled, any points found in multiple input point clouds will be removed, leaving just the points that are different between the two point clouds.
  • DELETE_DUPLICATES - if set, Lidar points with the same 3D location (and optionally equal additional attributes specified with the DUPLICATE_ATTR parameter) are marked as deleted
  • DUPLICATE_ATTR - specifies the name of a Lidar attribute that must match to be considered a duplicate. Multiple instances of the parameter can be provided. Without this parameter, DELETE_DUPLICATES deletes all duplicates with the same XYZ values. The following values are recognized:
    • CLASS - classification code
    • GPS_TIME - timestamp
    • INTENSITY - intensity
    • RETURN_NUM - return number
    • RETURN_CNT - number of returns
    • SOURCE_ID - point source ID

    .

SAMPLE

This script will compare and adjust loaded lidar to loaded vector point features, and generate a comparison report in the same folder as the script:

LIDAR_COMPARE REPORT_FILENAME="%SCRIPT_FOLDER%report.csv" FIT_POINTS=YES

An example script to delete duplicates with the same XYZ location, intensity, and GPS time looks like:

LIDAR_COMPARE DELETE_DUPLICATES=YES DUPLICATE_ATTR="INTENSITY" DUPLICATE_ATTR="GPS_TIME"

Example script that compares two point clouds to find changes and saves them to a new changed points layer

LIDAR_COMPARE FILENAME="Augusta Original" FILENAME2="Augusta Modified" MAX_DIST="0.1" LAYER_DESC="Changed Points"