LasCopy single class

44 views
Skip to first unread message

Evan Carlson

unread,
Jun 17, 2025, 3:40:30 PMJun 17
to LAStools - efficient tools for LiDAR processing
Is it possible to copy a single class from one point cloud to another using lascopy?

There was a mistake early on in our processing where a class 12 was dropped, we're now at the final steps before wrapping this project and realized class 12 was gone. Is it possible to use lascopy to move only class 12 to the near final point cloud?

My assumption is no, so this is the approach I took but it doesn't seem to be working and i'm assuming thats because the data has been georectified since the class 12 was dropped and the points no longer align. With the las2las, i'm isolating the points in class 12 and then using that output in the lascopy. The results are not producing any points in class 12, but if I add the -match_point_source_id flag it generates points in class 12 but they do not match the points from class12_only.laz.

las2las -i "source.las" -keep_classification 12 -o "class12_only.laz"

lascopy64 -i "class12_only.laz" -i "missing_class12.laz" -match_xy 0.5 -o "new_with_class12.laz" -v

Any suggestions would be appreciated. 

LAStools - efficient tools for LiDAR processing

unread,
Jun 17, 2025, 3:48:37 PMJun 17
to LAStools - efficient tools for LiDAR processing
Hi Evan,
lascopy64 copies attributes from one file to another by matching points in other attributes. You just want to add missing points, so maybe lasmerge64 can help you.

Probably it is worth to try 
    lasmerge64 -i  -"class12_only.laz" "missing_class12.laz" -o "new_with_class12.laz" -v

Does this solve the issue?

Cheers,

Jochen @rapidlasso

Evan Carlson

unread,
Jun 17, 2025, 5:06:20 PMJun 17
to LAStools - efficient tools for LiDAR processing
Thanks for Jochen. This doesn't work for a couple of reasons, first is that its duplicating points, the final data already has the points they just have the wrong classification, second the data has had some other adjustments conducted as well, specifically we've run lascontrol with -adjust-z.

LAStools - efficient tools for LiDAR processing

unread,
Jun 17, 2025, 5:12:20 PMJun 17
to LAStools - efficient tools for LiDAR processing
Hi Evan,
ok, if the points are there in the 2nd file lascopy64 is the right tool.
Please read the lascopy_README.md carefully. 
Check if you have better options to match the points: Matching by xy should work, but is maybe slow and difficult because of the specified maximum distance.
If you can not solve it feel free to provide a small sample of data and we can have a closer look to your data.

Cheers,

Jochen @rapidlasso

Reply all
Reply to author
Forward
0 new messages