The lascopy tool is well-known for matching data from different LAS/LAZ files and copying attributes between the files. The matching key is expected to have an identical timestamp/return to match the data. The redesign of lascopy expands the matching and coping part of the tool: it can now match not only for identical GPS time (which probably only works if the data has the same anchor) and a generally mismatched copy, but also for other attributes, even XYZ coordinates with optional distance match.
New matching functions between LiDAR files
The default match is still GPS and return number, so any existing scripts are still valid. Additionally, there are new matching arguments:
-match_classification: uses classification for point matching
-match_intensity: uses the intensity for point matching
-match_point_source_id: uses a point source for point matching
-match_scanner_channel: uses scanner channel for point matching
-match_xy [dist]: matches the point using the x-y coordinates and the specified maximum distance
-match_xyz [dist]: matches the point using the x-y-z coordinates and the specified maximum distance
-match_xyz_warn [n]: issues a warning if more than n points are considered for matching for a single point. This could indicate that a smaller adjustment distance should be used for better performance.
These matching arguments can also be combined. This makes it possible to match points that are at the same position (-match_xyz) and have the same classification (-match_classification).
Copy data
The option to copy data between source and target has been improved. Multiple copy arguments can be combined to copy more than one attribute.
-copy_classification: copy classification attribute (default)
-copy_elevation: copy elevation attribute (Z-value)
-copy_intensity: copy intensity attribute
-copy_keypoint_flag: copy keypoint flag to target
-copy_overlap_flag: copy overlap flag to target
-copy_synthetic_flag: copy synthetic flag to target
-copy_withheld_flag: copy withheld flag to target
Samples
Samples of copy operations
(a,b = key)
(1,2 = value)
File1 File2 Target
a 1 a 4 a 1
b 2
c 2 c 3
d 4 d 1 d 4
Only file 2 points will be in the target. Values with a matching counterpart in file 1 are copied from file 1 to file 2.
With argument -zero:
File1 File2 Target
a 1 a 4 a 1
b 2
c 2 c 0
d 4 d 1 d 4
The “-zero” argument sets all values without a counterpart in file 1 to zero in the output file.
- By default, the selected attributes of the source points are copied to all target points if the two have exactly the same combination of key values. Selecting attributes to copy is done by adding one or more ‚-copy_…‘ arguments. If no selection is made, the classifications are copied.
- By default, the points from the target file that do not have a match in the source file remain unchanged unless the ‚-zero‘ option is used, which instead sets the selected attributes to 0.
Reference:
Discussion about lascopy in our LAStools Google Group.