Thinning LiDAR files with LASTools
Dense LiDAR files can take a while to open and process. Sometimes it is convenient to work with a less dense version of a LiDAR file, perhaps as a test of some processing idea. ‘Thinning’ is the process of discarding LiDAR data from a file, in order to generate a smaller, less detailed file.
The lasthin.exe
tool is perfect for this task, but it is not free open source licensed. The free las2las.exe
can be used to achieve a similar result.
- Open the Windows command prompt:
Win + X
thenCommand prompt
- Navigate to the project folder:
CD C:\GossanHill
- We’ll work with these files:
29/03/2017 04:32 PM 946,176 las2las.exe
30/03/2017 08:45 PM 1,107,238,731 Merged12.las
- Enter a command like this:
las2las -i Merged12.las -keep_every_nth 2 -o Merged12-Half.las
las2las
is the program to run- The
-i Merged12.las
part represents the input file - The
-o Merged12-Hald.las
is the name of the output file we want to create. -keep_every_nth 2
is the instruction only keep ever 2nd data point. You can change the number to suit your needs.- The program runs for a little while, then you’ll see that a new file
Merged12-Half.las
has been created. It is roughly half the size of the input file. - We can run the program again:
las2las -i Merged12-Half.las -keep_every_nth 2 -o Merged12-Quarter.las
- And again:
las2las -i Merged12-Quarter.las -keep_every_nth 2 -o Merged12-Eighth.las
- The results are a set of files with less data (and smaller sizes, and quicker processing times):
30/03/2017 08:45 PM 1,107,238,731 Merged12.las
30/03/2017 09:01 PM 553,619,819 Merged12-Half.las
30/03/2017 09:04 PM 276,810,363 Merged12-Quarter.las
30/03/2017 09:05 PM 138,405,635 Merged12-Eighth.las
This article is part of the Orienteering Mapping with LiDAR, Smartphones and Free Tools series.
Polite and constructive responses are always welcome.