# filters.dbscan¶

The DBSCAN filter performs Density-Based Spatial Clustering of Applications with Noise (DBSCAN) [Ester1996] and labels each point with its associated cluster ID. Points that do not belong to a cluster are given a Cluster ID of -1. The remaining clusters are labeled as integers starting from 0.

New in version 2.1.

## Example¶

```
[
"input.las",
{
"type":"filters.dbscan",
"min_points":10,
"eps":2.0,
"dimensions":"X,Y,Z"
},
{
"type":"writers.bpf",
"filename":"output.bpf",
"output_dims":"X,Y,Z,ClusterID"
}
]
```

## Options¶

- min_points
The minimum cluster size

`min_points`

should be greater than or equal to the number of dimensions (e.g., X, Y, and Z) plus one. As a rule of thumb, two times the number of dimensions is often used. [Default: 6]- eps
The epsilon parameter can be estimated from a k-distance graph (for k =

`min_points`

minus one).`eps`

defines the Euclidean distance that will be used when searching for neighbors. [Default: 1.0]- dimensions
Comma-separated string indicating dimensions to use for clustering. [Default: X,Y,Z]

- 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`

]