Ignoring Extended Classes with lasclip

46 views
Skip to first unread message

Nicholas Wilson

unread,
Nov 30, 2018, 10:55:49 PM11/30/18
to LAStools - efficient tools for LiDAR processing
I am finding that using the -ignore_class flag with lasclip is only working with classes less than 31. Is there a way to get this to work with extended classes as well? 

Evon Silvia

unread,
Dec 26, 2018, 4:35:49 PM12/26/18
to last...@googlegroups.com
Sorry to resurrect an old(ish) post, but I recently ran into this as well while writing some LAStools scripts.

For LAS 1.4 files, to include the classifications beyond 0-31 available in LAS 1.4 point formats 6-10, you need to use -ignore_extended_class instead of -ignore_class. The latter quietly discards classifications above 31 (any chance of adding a warning, Martin?).

For LAS 1.3 and older files, it's a lot more complicated. if your intent was to use the full 8bit range of a LAS 1.0-1.3 file (ignoring the flags), you may also need to utilize the lightly-documented -move_ancient_to_extended_classification flag as described here: https://groups.google.com/d/msg/lastools/xy5WcWB0VSQ/tjlCyINyCAAJ

For example, if your LAS 1.2 was saved (using software other than LAStools) with points supposedly in class 35, the output class (in binary) might have been saved as 00100011. LAStools will correctly interpret that point to be classified as class 3-Synthetic since the 5th bit is the Synthetic flag, and so the point won't be ignored if you instruct LAStools to "-ignore_class 35". This can be confusing because other software (e.g., TerraScan) might report the classification as class 35. If your intent was for them to have classification 35, the -move_ancient_to_extended_classification command will ignore the flags and use the full 8bit range of the Classification field while importing the LAS file, and you can ignore those points as intended by also passing -ignore_extended_class 35.

If you find yourself in that scenario I'd highly recommend up-converting your LAS files to version 1.4 and point formats 6-10 to avoid these acrobatics.

Evon
--
Evon Silvia PLS
QSI Solutions Architect
ASPRS LAS Working Group Chair

Quantum Spatial
1100 NE Circle Blvd, Suite 126, Corvallis, OR 97330



On Fri, Nov 30, 2018 at 7:55 PM Nicholas Wilson <ncwil...@gmail.com> wrote:
I am finding that using the -ignore_class flag with lasclip is only working with classes less than 31. Is there a way to get this to work with extended classes as well? 

Martin Isenburg

unread,
Dec 28, 2018, 12:12:09 PM12/28/18
to LAStools - efficient command line tools for LIDAR processing
Hello Evon.

not sure which '-ignore_extended_class 42' switch you are referring to. It did not exist previously. But I've added one to lasclip:


Nicholas, please give it a try and report back to me how well it works. I've also added ERROR messages and let the program exit in case you call '-ignore_class 42'.

Regards.

Martin @rapidlasso

Evon Silvia

unread,
Dec 28, 2018, 12:43:00 PM12/28/18
to last...@googlegroups.com
My mistake! I have used '-drop_extended_class' extensively in las2las and lasgrid and assumed the equivalent was simply undocumented in lasclip. Thanks for the correction!

Evon
Reply all
Reply to author
Forward
0 new messages