[Liblas-devel] Extracting specific classes with Python

Howard Butler hobu.inc at gmail.com
Tue Sep 29 12:15:31 EDT 2009


All,

A user requested that las2las have options to extract specific classes  
into a new file rather than using the elimination approach that it  
currently uses.  Unfortunately, the new release won't be out for a  
while, and because las2las tracks Martin's tools, I'm a bit hesitant  
to start adding lots of divergent options.  One thing libLAS has that  
LAStools doesn't is Python bindings, however, and this task is quite  
simple in Python.

http://liblas.org/wiki/PyExtractClass

The following command line invocation would use the above script to  
extract classifications 1 and 2 from the input.las file to the  
output.las file...

python grab_classes.py --input input.las --output output.las  -- 
classifications 1,2

Enjoy,

Howard


More information about the Liblas-devel mailing list