After the addition of support for visualising point clouds in the recent versions of QGIS, the next step was to add the processing tools so users can manage and analyse their data.
There are several 3rd party QGIS plugins (either proprietary or not fully open source) which allow users to interrogate and analyse lidar data. But with our latest work, we have introduced powerful point cloud algorithms to the QGIS Processing framework. All the algorithms are available out of the box in QGIS 3.32, with no need to install plugins.
In this blog post, we summarise the initial point cloud algorithms for QGIS Processing toolbox which will be available in QGIS 3.32 (to be released at the end of June 2023). This work was made possible by the generous donations to our crowdfunding.
First off a quick look at the new algorithms as shown in the Processing toolbox in three groups:
Point Cloud algorithms in QGIS processing toolbox
Input point cloud layer file
Raster output using Intensity attribute of points
Terrain raster output generated by point cloud triangulation
Exporting point cloud (ground points) to Shapefile styled based on the elevation!
Input point cloud layer and a polygon coverage
Result of the clipping algorithm
LAS 1.4 point format 6 count 56736130 scale 0.001 0.001 0.001 offset 431749.999 5440919.999 968.898 extent 431250 5440420 424.266 432249.999 5441419.999 1513.531 crs ETRS89 / UTM zone 34N (N-E) (EPSG:3046) (vertical CRS missing!) units horizontal=metre vertical=unknown Attributes: - X floating 8 - Y floating 8 - Z floating 8 - Intensity unsigned 2 - ReturnNumber unsigned 1 - NumberOfReturns unsigned 1 - ScanDirectionFlag unsigned 1 - EdgeOfFlightLine unsigned 1 - Classification unsigned 1 - ScanAngleRank floating 4 - UserData unsigned 1 - PointSourceId unsigned 2 - GpsTime floating 8 - ScanChannel unsigned 1 - ClassFlags unsigned 1
Output from point cloud information algorithm
Thining point cloud (by sampling radius)
Extracting high vegetation and building polygons from an input point cloud layer
Point density (number of points per 2x2 m) as a raster
Filtering of high vegetation class from an input point cloud layer
All the heavy lifting of the point cloud processing is done by PDAL - a state of the art open source library for processing point clouds. PDAL provides a wide range of “readers”, “filters” and “writers” to build complex pipelines to process point clouds.
We have built a new standalone command line tool pdal_wrench on top of PDAL. It addresses two major issues that non-expert users typically face when working with PDAL:
The command line tool provides a simple set of commands that take care of everything. For example, to export a raster layer with elevations (DEM) with 1 meter resolution:
pdal_wrench to_raster --output=raster.tif --resolution=1 --attribute=Z data.las
The pdal_wrench tool does not depend on QGIS, so it can be easily used separately.
The commands are designed to run in parallel when there are multiple input files or when the input file is in COPC format. Depending on the algorithm, the work gets split spatially into square tiles (1000x1000 map units by default) for parallel processing, or individual files are processed in parallel. With a single ordinary LAS/LAZ file on input, there is currently no parallelism going on.
For commands that are sensitive to edge artifacts (such as export to raster), we take care of processing extra points outside of the extent of each tile (referred to as collar or buffer) to make sure the results are correct as if no tiling would be happening (see Martin Isenburg’s article for more details: https://rapidlasso.com/2015/08/07/use-buffers-when-processing-lidar-in-tiles/).
The current list of point cloud algorithms already allows users to do plenty of work. But more could be added to the toolbox - algorithms that are already supported by PDAL, but not exposed in QGIS: classification, noise removal, surface reconstruction, clustering, height above ground, colorizing and many more. If you are interested in more point cloud processing algorithms in QGIS, please contact us and we will be happy to add them to future QGIS releases.