What is difference between keep_every_nth and thin_with_grid ?

68 views
Skip to first unread message

Nicholas Pilkington

unread,
Dec 12, 2017, 8:23:01 PM12/12/17
to LAStools - efficient tools for LiDAR processing
Hi there!

I am using las2las.exe before processing a LAS file. The number of points can be both small (50K) and large (> 100M) and I would like to reduce the larger datasets down because otherwise various LAStools crash, in particular lasthin (even with -sparse) and lasground and lasground_new.

What is the most robust was to reduce the number of points and maintain structure? i.e. What is the difference between keep_every_nth and thin_with_grid?

Also in general what is the threshold on number of points above which it's recommend to use tiles? (The reason I'm not using tiles at this point is that I can't get the same result using tiles yet which I need to look into at some point)

Nick 

Martin Isenburg

unread,
Dec 13, 2017, 3:02:34 AM12/13/17
to LAStools - efficient command line tools for LIDAR processing
Hello Nick,

The option '-keep_every_nth 3' that is part of LASlib and therefore can be used as an on-the-fly read filter to any LAStools simply keeps every nth point from the file. Hence it will drop the 1st and the 2nd point of the file but keep the 3rd. Then it will drop the 4th and the 5th point but keep the 6th. That means which points are dropped solely depends on their storage position in the file and not on any of their attributes. 

The option '-thin_with_grid 0.5'  is also part of LASlib and therefore can be also be used as an on-the-fly read filter to any LAStools. It simply keeps the *first* point that falls into a the cell of a uniform grid of the specified cells size. Which point is kept *per cell* again depends on the storage position of the point in the file. But for each cell that is covered by the point cloud at least one point is kept. Which point that is is solely decided by first appearance in sequential read order.

The tool lasthin offers much more control about which points are thinned out. You can keep the most '-central' point per cell or a '-random' point per cell. You can keep the '-highest' or '-lowest' or the point that is closed to a certain elevation '-percentile 30' or '-percentile 90' as well as a few other option as documented in the README file:


Regards,

Martin @rapidlasso
Reply all
Reply to author
Forward
0 new messages