Published on 9.3.2021

How to handle point clouds in QGIS 3.18?

Open source GIS community did it again! QGIS 3.18 was upgraded in late February 2021 with loads of new features, among others landed the capabilities for visualizing point clouds in your favorite GIS desktop.

point cloud
There it is, just in between the usual data sources you’ve used to handle in your daily workflows.

For just visualizing your .laz-files, there’s not much more to it. Just load the dataset and see how far your computer gets with the data (point cloud datasets are often big).

point cloud
QGIS 3.18 in action with a point cloud dataset from Vancouver (Data: © 2021 City of Vancouver, © Maptiler, OpenStreetMap editors).

QGIS will serve you greatly as a platform for visualizing your point cloud data as part of your GIS workflows. Nevertheless, as the point cloud datasets are often that big, in many cases, it is relevant to preprocess the data.

This can be done with PDAL, which is the library the enables the point cloud visualization in QGIS. PDAL is a command-line tool (server-side / desktop) for processing and analyzing point cloud data. It is an extremely powerful set of tools for such huge datasets as lidar and point cloud data almost always tends to be.

For example, the dataset I’m using (from Vancouver) had originally slightly less than 40 million points from an area of 1 square kilometer. QGIS, at least on my laptop, did handle that amount of points and did not take more than one or two minutes to load the dataset. Nevertheless, having that much data did not really serve my purpose and could slow my QGIS workflow. Thus, with PDAL I reduced the dataset’s size from approximately 40 million to slightly more than two hundred thousand points, while reducing the filesize from 1.1 gb (as .las) to 2.2 mb (as .laz).

pdal translate 4910E_54580N.las 4910E_54580N_thin.laz sample - filters.sample.radius=3

It is worth mentioning that QGIS had problems just when opening the “3D view” and visualizing the point cloud data in 3D. Visualizing the data in 2D (as is) did not slow QGIS down.

There’s no other GIS tool that could visualize jointly your point cloud data together with such a variety of GIS formats. By just exploring lidar data in flat 2D is already very useful and helps to understand visually some processes and peculiarities related to point cloud data.

point cloud
Full dataset explored from a flat 2D viewpoint.

While I already was very happy with my results from reducing the size of the file, I observed some noise in the data, points out of the bounding box, and some other minor issues. These could be removed easily using PDAL’s pipeline functionalities for denoising. Pipelines are in the very core of PDAL providing a possibility for automatizing and chaining geoprocesses together while keeping it simple (text files saved as .json-files):

point cloud
Contents from the denoise.json file.

Then I just ran the pipeline file in the command line:

pdal pipeline denoise.json

This is how you can manipulate the point cloud with PDAL and bring it back to QGIS for visualizing and other possible workflows.

You can use PDAL for a myriad of processes, such as for producing raster files, such as Digital Elevation or Terrain Models from your point cloud data.

point cloud
Read more directly from PDAL’s site.

That’s it! There’s a lot to go about with QGIS 3.18 and for sure the QGIS & PDAL partnership is not falling short. I’ll leave you with an explorative visualization by another relatively new feature “contour renderer” for remarking on-the-fly the contours of a raster file:

point cloud

It is worth noting that the point cloud support is a major effort from the open source geospatial software community, including especially the QGIS and PDAL communities, and the direct developer efforts from companies such as Lutra Consulting Ltd., Hobu Inc., and Nyall Dawson. A crowdfunding campaign was held in late 2020, and a group of contributors supported financially the point cloud support.


Santtu Pyykkönen

Santtu Pyykkönen is MSA who is interested in GIS (and all its glory), open source software and open communities and urban development. Freetime activities consist of running and reading.