Executing adaptive filter pipelines

Once you have completed the work of creating a segmentation for your dataset and choosing the appropriate filter settings for your terrain type, you might want to apply your filter to the entire dataset. This step can be done in two ways: Either through the Python API or more conveniently through a command line interface.


Command Line Interface for AFwizard

This CLI is used once you have finished the interactive exploration work with the AFwizard Jupyter UI. The CLI takes your dataset and the segmentation file created in Jupyter and executes the ground point filtering on the entire dataset.

afwizard [OPTIONS]


--dataset <dataset>

Required The LAS/LAZ data file to work on.

--dataset-crs <dataset_crs>

Required The CRS of the data

--segmentation <segmentation>

Required The GeoJSON file that describes the segmentation of the dataset. This is expected to be generated either by the Jupyter UI or otherwise provide the necessary information about what filter pipelines to apply.

--segmentation-crs <segmentation_crs>

Required The CRS used in the segmentation

--library <library>

A filter library location that AFwizard should take into account. Can be given multiple times.

--output-dir <output_dir>

The directory to place output files (both LAS/LAZ and GeoTiff).



--resolution <FLOAT>

The meshing resolution to use for generating GeoTiff files




Whether LAZ files should be written instead of LAS.

--suffix <suffix>

The suffix to add to filtered datasets.



--opals-dir <opals_dir>

The directory where to find an OPALS installation

--lastools-dir <lastools_dir>

The directory where to find a LASTools installation

Python API

afwizard.execute.apply_adaptive_pipeline(dataset=None, segmentation=None, pipelines=None, output_dir='output', resolution=0.5, compress=False, suffix='filtered')

Python API to apply a fully configured adaptive pipeline

This function implements the large scale application of a spatially adaptive filter pipeline to a potentially huge dataset. This can either be used from Python or through AFwizard’s command line interface.

  • datasets (list) – One or more datasets of type ~afwizard.dataset.DataSet.

  • segmentation (afwizard.segmentation.Segmentation) – The segmentation that provides the geometric information about the spatial segmentation of the dataset and what filter pipelines to apply in which segments.

  • output_dir (str) – The output directory to place the generated output in. Defaults to a subdirectory ‘output’ within the current working directory/

  • resolution (float) – The resolution in meters to use when generating GeoTiff files.

  • compress (bool) – Whether to write LAZ files instead of LAS>

  • suffix (str) – A suffix to use for files after applying filtering