I am using las2las to filter .las data and I would like to filter the data between a scan angle of -15:+15; however the algorithm tells me the following: ?

error bad lexical cast: source type value could not be interpreted.

I using the following as my input:

las2las -i /home/user/input.las -o /home/user/output.las --keep-scan-angle -15-15

How do I filter between a negative and positive range? From -15 to +15?

  • 1
    Make sure you are using LAStools not libLAS Jul 22, 2016 at 21:52

1 Answer 1


See the examples on las2las README. The correct way to express this parameter is:

-keep_scan_angle -15 15

The full code would be:

las2las -i input.las -o output.las -keep_scan_angle -15 15

For filtering LiDAR data by scan angle with other software, refer to: How to filter LiDAR data by scan angle?

  • Unfortunately, that does not work for me as I have already used --keep-scan-angle '0' and that works fine. However, when I put in a range, it does not work Jul 25, 2016 at 10:37
  • It does not seem to like a negative range!! Jul 25, 2016 at 10:47
  • Did you try exactly how it was written above, i.e., with one dash "-" before "keep" (not two), and with a white space between -15 and 15 (and without quotation marks)? It should have worked, but not sure you followed the example. If none of these previous suggestions solves your problem, you might want to report a bug/ask for assistance in the LAStools forum group. @user1655130 Jul 25, 2016 at 11:24
  • Yep and it givesd me an error:unrecognised option '-keep_scan_angle'. I'm using it through the Linux command line. Jul 25, 2016 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.