The dataset used in this example notebook is from the Nakadake Sanroku Kiln Site Center in Japan. The data set is provided by Shinoto et al. under the CC-BY-4.0 license: DOI

Selecting a filter pipeline for a dataset

[1]:
import afwizard

The goal of this notebook is to find the best fitting filter pipeline for a given dataset (or rather a suitably copped subset there of). If you want to manually create the filter pipeline from scratch, you should read the notebook on pipeline creation instead. Here, we assume that we want to leverage existing, community-contributed filter pipelines. In a first step, we select a number of filter pipeline candidates from filter libraries. Details about how to register additional filter libraries, can be found in the notebook on filter libraries. We use the select_pipelines_from_library function, which allows us to select any number of filter by keeping CTRL pressed while clicking additional filters. In the left most column, we see filtering criterions we can use to access the filter pipelines in our filtering libraries. The middle column contains a list of filter pipelines that match the given criteria. Clicking one of these will select it and show its metadata in the third column. Multiple filters can be selected by keeping CTRL pressed while clicking additional filters.

[2]:
pipelines = afwizard.select_pipelines_from_library()

Next thing to do is to load a dataset as described in Working with datasets. Again, it is best to restrict the sample size to a reasonable size (e.g. by using the restrict method on the dataset) to allow a truely interactive exploration process.

[3]:
dataset = afwizard.DataSet(
    filename="nkd_pcl_epsg6670.laz", spatial_reference="EPSG:6670"
)

We can then create a comparison of ground point filtering results with the goal of choosing the most fitting pipeline. Each tab shows the filtering results of one of the selected pipelines. In the left column, we can fine tune visualization and rasterization options while on the right hand side, we can fine tune the filter. The configuration options shown here have been introduced by the author of the filter pipeline for you to fine tune the results:

[4]:
best = afwizard.select_best_pipeline(dataset, pipelines=pipelines)

The newly create filter pipeline object best has the end user configuration specified in the right column baked into the filter. This means that the resulting filter is to some extent a dataset-specific specialization of the general purpose filter pipeline. To distinguish such specialized filter from more general ones, it is useful to save it into a separate filtering library as outlined in the notebook on filtering libraries, e.g. by using set_current_filter_library to set up a filtering library for your current project before saving any filters:

[5]:
afwizard.set_current_filter_library(
    "projectx", create_dirs=True, name="Filters for projext X"
)
[6]:
afwizard.save_filter(best, "bestfilter.json")
WARNING: This filter has insufficient metadata. Please consider adding in af.pipeline_tuning!