6

I am looking to filter LiDAR data (.las format) by scan angle specifications (e.g. keep all points < 15). From a basic Google search, it appears that the libLAS library has the ability to filter by scan angle using las2las.

What other tools exist to filter .las files by scan angle, either open-source or commercial? I am particularly interested in tools that are suited for bulk processing.

  • Are you looking to exclude points with a scan angle greater than a certain threshold from interpolation? If so, the LAS interpolators in Whitebox can do this. See this blog for details: whiteboxgeospatial.wordpress.com/2014/03/16/… particularly the paragraph nearer the bottom that starts, "The maximum scan angle deviation parameter in the IDW interpolator..." Oh, and as always to be up front, I must state that I am the lead developer of the Whitebox GAT project. – WhiteboxDev Sep 28 '14 at 13:10
  • And I should have mentioned, with regards to your requirement that it operates in bulk, the LAS interpolators will take any number of LAS files as input and can also be hooked up to a python script to automate workflows. – WhiteboxDev Sep 28 '14 at 13:15
  • I am looking to exclude points above some threshold (e.g. <= 15) and write back to .las format. Sound like Whitebox has a lot of interesting functionality--I will have to take it for a test drive sometime. – Aaron Sep 28 '14 at 13:15
  • I can easily write you a script that will do this if you like. It will just take me a few minutes. – WhiteboxDev Sep 28 '14 at 13:16
  • 1
    SAGA also has some functionality to import a las file into a point cloud, then subset it with the extract/subset module. You can use SAGA from the commandline so it is possible to create batch scripts. – user1269942 Sep 28 '14 at 15:13
6

I just finished writing a script to accomplish this task using the free and open-source GIS Whitebox Geospatial Analysis Tools (download here), for which I am the lead developer. The source code of the script can be found here. Although the script is not yet part of the current official Whitebox release (v. 3.2.1) you can get an early version of it by selecting Update Scripts From Repository from the Tools menu. You will need to relaunch Whitebox after doing this. You should then find a new script in the LiDAR toolbox called Filter LAS Scan Angles. Unfortunately you won't have an associated Help file until the public release of the tool with the next version of Whitebox.

enter image description here

The tool takes any number of LAS file inputs and will filter them in parallel. Thus, the performance should scale with the number of cores you have on your system. If you want to integrate the tool within a workflow involving multiple steps or run it in batch mode, you can also call the tool from a Python script in the Whitebox Scripter using the following as an example:

wd = pluginHost.getWorkingDirectory() 
# You may have multiple input files but they must # be separated by semicolons in the string. 
inputs = wd + "input1.las" + ";" + wd + "input2.las" + ";" + wd + "input3.las" 
threshold = "15.0"
args = [inputs, threshold]
pluginHost.runPlugin("FilterLasScanAngles", args, False)

The tool will output a ShapeFile of MULTIPOINTZ shapetype for each LAS input. The elevation and intensity values are stored in the Z and M properties of the points respectively. I hope that suffices, if not, I can work on it to output LAS files, but it'll take more time.

Here's an example, where I've filtered a LAS file to remove all points with a scan angle greater than 4 degrees. The resulting ShapeFile (in green palette) has been overlayed overtop the original LAS file (in blue palette) and you can see the flight line pattern associated with varying point scan angle.

enter image description here

3

In terms of commercial software, FME can do this using PointCloudFilter transformer:

example

The syntax required in the 'expression' input is unique to FME, but easy to learn. Here is a video demonstrating how to use PointCloudFilter expressions.

In general, FME would probably not process point clouds as fast as a dedicated LiDAR software, but it could certainly handle any bulk .las tasks.

1

Fusion v. 3.60+ now supports clipping .las files by scan angle through the ClipData tool. According to Fusion notes:

2/22/2016 ClipData V2.60 Added the /anglemin and /anglemax options to clip data using the min/max scan angle rank values. ... Note that the scan angle rank values in LAS files are integers ranging from -90 to 90 degrees with 0 at nadir relative to the aircraft.

So the ClipData parameterization* for keeping all points with angles < 15 would look like:

ClipData /anglemin:-16 /anglemax:15 InputSpecifier SampleFile [MinX MinY MaxX MaxY]

where switches anglemin:# and /anglemax:# mean, respectively:

anglemin:# Include points with scan angles greater than # (LAS only).
anglemax:# Include points with scan angles less than or equal to # (LAS only).

The 'Technical Details' section in the manual has some considerations about this update, though. One important part of it states that 'ClipData` won't work yet with .las files of version 1.4.

*The following post has more details about using ClipData: Normalizing point cloud data.

1

Cloud Compare has a simple interactive solution too!

1) Select the point cloud in the 'DB tree' by clicking on it once.

2) In the 'Properties' window below the DB tree, the various attributes of the selected point cloud can be viewed. Scroll down to 'Scalar Fields' and select the desired attributes. This will display the point cloud with a colour scaling in terms of the selected attribute.

3) Scroll further down to 'SF display params'. In 'Display ranges', play with the slider or manually enter the values of your desired range. It is an interactive tool and it will grey-out all the points which do not possess the values falling in the range.

4) Finally, you can note down the min and max values of the range and use the 'Filter points by values' tool to subset the dataset based on the selected range. Generally, when you open the 'filter points by value' tool, the min and max values from the slider are directly visible in the tool.

All the best!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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