# filters.cluster

The Cluster filter first performs Euclidean Cluster Extraction on the input `PointView` and then labels each point with its associated cluster ID. It creates a new dimension `ClusterID` that contains the cluster ID value. Cluster IDs start with the value 1. Points that don’t belong to any cluster will are given a cluster ID of 0.

Default Embedded Stage

This stage is enabled by default

## Example

    [
        "input.las",
        {
            "type":"filters.cluster"
        },
        {
            "type":"writers.bpf",
            "filename":"output.bpf",
            "output_dims":"X,Y,Z,ClusterID"
        }
    ]

## Options

min_points

  Minimum number of points to be considered a cluster. [Default: 1]

max_points

  Maximum number of points to be considered a cluster. [Default: 2^64 - 1]

tolerance

  Cluster tolerance - maximum Euclidean distance for a point to be added to the cluster. [Default: 1.0]

is3d

  By default, clusters are formed by considering neighbors in a 3D sphere, but if `is3d` is set to false, it will instead consider neighbors in a 2D cylinder (XY plane only). [Default: true]

where

  An expression that limits points passed to a filter. Points that don’t pass the expression skip the stage but are available to subsequent stages in a pipeline. [Default: no filtering]

where_merge

  A strategy for merging points skipped by a ‘where’ option when running in standard mode. If `true`, the skipped points are added to the first point view returned by the skipped filter. If `false`, skipped points are placed in their own point view. If `auto`, skipped points are merged into the returned point view provided that only one point view is returned and it has the same point count as it did when the filter was run. [Default: `auto`]