Skip to content

Commit

Permalink
Radius search filter: add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
leavauchier committed Nov 30, 2023
1 parent 73704ab commit a3c65cb
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
60 changes: 60 additions & 0 deletions doc/stages/filters.radiussearch.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
.. _filters.radiussearch:

filters.radiussearch
==========================

The **radius search filter** allows you update the value of a dimension (using
an assignment expression) for specific points depending on their neighbors
in a given radius:
For each point in the domain src_domain_, if it has any neighbor with a
distance lower than radius_ that belongs to the domain reference_domain_,
it is updated using the expression update_expression_.


.. embed::

Example 1
---------

This pipeline updates the Keypoint dimension of all points with classification
1 to 2 (unclassified and ground) that are closer than 1 meter from a point with
classification 6 (building)


.. code-block:: json
[
"las/4_6.las",
{
"type" : "filters.radiussearch",
"src_domain" : "Classification[1:2]",
"reference_domain" : "Classification[6:6]"
"radius" : 1
"update_expression": "Keypoint = 1"
},
"output.las"
]
Options
-------

_`src_domain`
A :ref:`range <ranges>` which selects points to be processed by the filter.
Can be specified multiple times. Points satisfying any range will be
processed

_`reference_domain`
A :ref:`range <ranges>` which selects points that can are considered as
potential neighbors. Can be specified multiple times.

_`radius`
An positive float which specifies the radius for the neighbors search.

_`update_expression`
A list of :ref:`assignment expressions <Assignment Expressions>` to be applied to
the points that satisfy the radius search. The list of values is evaluated in order.


.. include:: filter_opts.rst

4 changes: 4 additions & 0 deletions doc/stages/filters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ Pointwise Features
filters.optimalneighborhood
filters.planefit
filters.radialdensity
filters.radiussearch
filters.reciprocity
filters.zsmooth

Expand Down Expand Up @@ -231,6 +232,9 @@ Pointwise Features
:ref:`filters.radialdensity`
Compute pointwise density of points within a given radius.

:ref:`filters.radiussearch`
Assign values to a dimension classification using k-nearest neighbor consensus voting.

:ref:`filters.reciprocity`
Compute the percentage of points that are considered uni-directional
neighbors of a point.
Expand Down

0 comments on commit a3c65cb

Please sign in to comment.