Identifying ground¶
This exercise uses PDAL to classify ground returns using the Progressive Morphological Filter (PMF) technique.
Note
This excerise is an adaptation of the Identifying ground returns using ProgressiveMorphologicalFilter segmentation tutorial on the PDAL website by Brad Chambers. You can find more detail and example invocations there.
Exercise¶
The primary input for Digital Terrain Model generation is a point cloud with ground vs. not-ground classifications. In this example, we will use an algorithm provided by PDAL, the Progressive Morphological Filter technique to generate a ground surface.
See also
PMF is implemented in PCL. PCL is then linked to PDAL. You can read more about the specifics of the algorithm from the paper, and you can read more about the PCL implementation in the source code on github.
Command¶
Invoke the following command, substituting accordingly, in your Docker Quickstart Terminal:
1 2 3 4 5 6 | docker run -v /c/Users/Howard/PDAL:/data -t pdal/pdal \
pdal ground \
/data/exercises/analysis/ground/CSite1_orig-utm.laz \
-o /data/exercises/analysis/ground/ground.laz \
--filters.ground.classify=true \
--writers.las.compression=true -v 4
|

As we can see, the algorithm does a great job of discriminating the points, but there’s a few issues.

There’s noise underneath the main surface that will cause us trouble when we generate a terrain surface.

Filtering¶
We do not yet have a satisfactory surface for generating a DTM. When we visualize the output of this ground operation, we notice there’s still some noise. PCL also has its own Pipeline concept, and we can stack the call to PMF with a call to a the filters.statisticaloutlier technique we learned about in Removing noise.
- Let us start by removing the non-ground data:
1 2 3 4 5 6 7 | docker run -v /c/Users/Howard/PDAL:/data -t pdal/pdal \
pdal ground \
/data/exercises/analysis/ground/CSite1_orig-utm.laz \
-o /data/exercises/analysis/ground/ground-only.laz \
--filters.ground.classify=true \
--filters.ground.extract=true \
--writers.las.compression=true -v 4
|
Note
The filters.ground.extract=true
item causes all data except
ground-classified points to be removed from the set.
Buildings and other non-ground points are removed with the extract
option
of filters.ground

- Now we will remove the noise. PDAL has the pcl to allow you to pass PCL pipelines for processing. We will use this to combine the PMF and StatisticalOutlierRemoval filters into a single operation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | {
"pipeline": {
"name": "Progressive Morphological Filter with Outlier Removal",
"version": 1.0,
"filters": [{
"name": "StatisticalOutlierRemoval",
"setMeanK": 8,
"setStddevMulThresh": 3.0
}, {
"name": "ProgressiveMorphologicalFilter",
"setCellSize": 1.5
}]
}
}
|
Note
- This pipeline is available in your workshop materials in the
./exercises/analysis/ground/filter.json
file.
1 2 3 4 5 | docker run -v /c/Users/Howard/PDAL:/data -t pdal/pdal \
pdal pcl \
/data/exercises/analysis/ground/CSite1_orig-utm.laz \
-o /data/exercises/analysis/ground/ground-filtered.laz \
-p /data/exercises/analysis/ground/filter.json
|
The pcl allows you to use 1 Draft PCL JSON Specification operations in succession over data.

Note
This pipeline is available in your workshop materials in the
./exercises/analysis/ground/filter.json
file.