LAStools - thomaspingel/advanced_remote_sensing GitHub Wiki
LAStools contains a variety of tools for point cloud processing. It can be run via the commandline (our usual case) but used within Python, ArcGIS, and QGIS, in addition to having its own simple GUI functionality. LAStools is one of the most efficient ways to quickly reproject, compress, filter, and create DEMs out of point cloud data. It can be downloaded for free, but requires a license to use full functionality. Since the passing of the author in 2021, we no longer have a license, but many key functions are free to use.
Installation
- LAStools can be downloaded for free, as a zip file.
- Unzip this file to a directory you'll remember. I generally unzip to c:\lastools or c:\Program Files\lastools
- If you have a license (a file called lastoolslicense.txt), place it in you bin directory (e.g., c:\lastools\bin). LAStools will operate without a license file, but on some data processing may add small amounts of distortion.
- It's often helpful to add LAStools to your system path, so that you can run the tools from anywhere on the command line. To do this, right click on "This PC" -> Properties -> Advanced System Settings -> Environment Variables. On the bottom pane ("System Variables") look for "Path" and hit "Edit". Click "New" and then type (or paste) the path to your lastools bin directory (e.g., "c:\lastools\bin")
Training:
- LAStools Workshop in Brazil
- Alberta LAStools seminar
Examples:
las2las
las2las can be used to reproject data, to convert formats from feet to meters, to combine files, to select based on a bounding box or polygon, to repair files, and to change format (e.g., LAS to LAZ).
Take all LAS files in an input directory and convert them each from State Plane units of feet to units of meters:
las2las -i *.las -odir c:\temp2 -olaz -sp83 IL_E -elevation_feet -feet -target_sp83 IL_E -target_elevation_meter -target_meter
Take a single LAS file and reproject it from an Oregon Lambert system (in feet) to a UTM system (in meters)
las2las -i OR_SouthCoast_2008_000928.las -epsg 2992 -feet -elevation_feet -target_utm auto -target_meter -target_elevation_meter
Take all LAZ files in an input directory, merge them, and project them into UTM with units going from feet to meters:
las2las -i input/*.laz -o output/merged.las -merged -epsg 2885 -feet -elevation_feet -target_utm auto -target_meter -target_elevation_meter
lasgrid
lasgrid -i *.laz -o c:\temp\max.2m.tif -elevation -max -step 2 -v -merged -mem 2000 -temp_files c:\temp\temp -nodata nan
lasgrid -i *.laz -keep_class 2 -o c:\temp\ground.max.2m.tif -elevation -max -step 2 -v -merged -mem 2000 -nodata nan -temp_files c:\temp\temp
lasgrid -i *.las -o c:\temp\ground.5ft.tif -keep_class 2 -elevation -average -step 5 -v -merged -nodata -9999
lasclip
For clipping an area out of large directory of LAZ/LAS files, it seems faster to use lasclip with a boundary than to use las2las with the –keep_xy option. Clipfile can be shapefile, but also just a text file list of coords in counter-clockwise order, and with a same start and finish.
lasclip -i *.laz -poly d:\clip.txt -o d:\blacksburg.laz -merged
lasboundary
lasboundary -i *.laz -oshp -use_bb
Repair of liblas error: Liblas exception: 'version minor out of range'
las2las -i *.las -set_version 1.2