geos::operation::cluster::DBSCANClusterFinder Class Reference

`#include <DBSCANClusterFinder.h>`

Inheritance diagram for geos::operation::cluster::DBSCANClusterFinder:

## Public Member Functions

| DBSCANClusterFinder (double eps, size_t minPoints)
Public Member Functions inherited from geos::operation::cluster::AbstractClusterFinder
Clusters | cluster (const std::vector< const geom::Geometry * > &g)
std::vector< std::unique_ptr< geom::Geometry > > | clusterToVector (std::unique_ptr< geom::Geometry > &&g)
std::vector< std::unique_ptr< geom::Geometry > > | clusterToVector (const geom::Geometry &g)
std::unique_ptr< geom::Geometry > | clusterToCollection (std::unique_ptr< geom::Geometry > &&g)
std::unique_ptr< geom::Geometry > | clusterToCollection (const geom::Geometry &g)

## Protected Member Functions

const geom::Envelope & | queryEnvelope (const geom::Geometry *a) override
Clusters | process (const std::vector< const geom::Geometry * > &components, index::strtree::TemplateSTRtree< std::size_t > &index, UnionFind &uf) override
bool | shouldJoin (const geom::Geometry *, const geom::Geometry *) override

## Detailed Description

DBSCANClusterFinder clusters geometries according to the DBSCAN algorithm.

## Member Function Documentation

## process()

Clusters geos::operation::cluster::DBSCANClusterFinder::process | ( | const std::vector< const geom::Geometry * > & | components,
|  | index::strtree::TemplateSTRtree< std::size_t > & | index,
|  | UnionFind & | uf )

override protected virtual

Given a vector and index of components,

Parameters

  components | a vector of Geometry components
  index | a spatial index storing pointers to those components
  uf | a UnionFind

Returns
  a vector of with the indices of all components that should be included in a cluster

Reimplemented from geos::operation::cluster::AbstractClusterFinder.

## queryEnvelope()

const geom::Envelope & geos::operation::cluster::DBSCANClusterFinder::queryEnvelope | ( | const geom::Geometry * | a | ) |

inline override protected virtual

Provide an query Envelope that can be used to find all geometries possibly in the same cluster as the input.

Parameters

  a | Geometry

Returns
  an Envelope suitable for querying

Implements geos::operation::cluster::AbstractClusterFinder.

References geos::geom::Envelope::expandBy(), and geos::geom::Geometry::getEnvelopeInternal().

## shouldJoin()

bool geos::operation::cluster::DBSCANClusterFinder::shouldJoin | ( | const geom::Geometry * | a,
|  | const geom::Geometry * | b )

inline override protected virtual

Determine whether two geometries should be considered in the same cluster.

Parameters

  a | Geometry
  b | Geometry

Returns
  true if the clusters associated with a and b should be merged.

Implements geos::operation::cluster::AbstractClusterFinder.

The documentation for this class was generated from the following file:

- DBSCANClusterFinder.h