te::gm::CoordinateSnapper Class Reference

Algorithm to snap existing "close" coordinates to each other based uppon a given tolerance, ensuring that they now have the exactly same location. More...

#include <CoordinateSnapper.h>

Static Public Member Functions

static te::gm::GeometryPtr snapCoordinates (const te::gm::Geometry *geometry, double distance, bool validateResult=true)
 Algorithm to snap existing "close" coordinates to each other based uppon a given tolerance, ensuring that they now have the exactly same location. More...
 
static te::gm::GeometryVector snapCoordinates (const te::gm::GeometryVectorConst &vecGeometries, double distance, bool validateResult=true)
 Algorithm to snap existing "close" coordinates to each other based uppon a given tolerance, ensuring that they now have the exactly same location. More...
 

Static Protected Member Functions

static void populateCoordIndex (const te::gm::Geometry *geometry, CoordIndex &coordIndex)
 Populates the coordinate index considering the coordinates of the given geometry. More...
 
static void populateCoordIndex (const te::gm::GeometryVectorConst &vecGeometries, CoordIndex &coordIndex)
 Populates the coordinate index considering the coordinates of the given geometry vector. More...
 
static te::gm::GeometrysnapCoordinates (const te::gm::Geometry *geometry, double distance, CoordIndex &coordIndex, bool &wasChanged)
 Snaps the geometry coordinates to the existing clusters in the coordinate index. More...
 
static te::gm::GeometryVector snapCoordinates (const te::gm::GeometryVectorConst &vecGeometries, double distance, bool validateResult, CoordIndex &coordIndex)
 Snaps the geometries coordinates to the existing clusters in the coordinate index. More...
 
static void snapToClusters (double distance, CoordIndex &coordIndex)
 Analyses all the coordinates in the coordinate index, detecting clusters and the snapping them to each detected cluster. More...
 

Detailed Description

Algorithm to snap existing "close" coordinates to each other based uppon a given tolerance, ensuring that they now have the exactly same location.

See also
GeometrySnapper

Definition at line 56 of file CoordinateSnapper.h.

Member Function Documentation

◆ populateCoordIndex() [1/2]

static void te::gm::CoordinateSnapper::populateCoordIndex ( const te::gm::Geometry geometry,
CoordIndex &  coordIndex 
)
staticprotected

Populates the coordinate index considering the coordinates of the given geometry.

Parameters
geometryThe geometry from which the coordinates will be added to the coordinate index
coordIndexThe index to be populated

◆ populateCoordIndex() [2/2]

static void te::gm::CoordinateSnapper::populateCoordIndex ( const te::gm::GeometryVectorConst vecGeometries,
CoordIndex &  coordIndex 
)
staticprotected

Populates the coordinate index considering the coordinates of the given geometry vector.

Parameters
vecGeometriesThe geometries from which the coordinates will be added to the coordinate index
coordIndexThe index to be populated

◆ snapCoordinates() [1/4]

static te::gm::GeometryPtr te::gm::CoordinateSnapper::snapCoordinates ( const te::gm::Geometry geometry,
double  distance,
bool  validateResult = true 
)
static

Algorithm to snap existing "close" coordinates to each other based uppon a given tolerance, ensuring that they now have the exactly same location.

Parameters
geometryThe geometry to be analysed
distanceThe distance to be considered for the snapping of the coordinates.
Returns
The resulting snapped geometry

◆ snapCoordinates() [2/4]

static te::gm::Geometry* te::gm::CoordinateSnapper::snapCoordinates ( const te::gm::Geometry geometry,
double  distance,
CoordIndex &  coordIndex,
bool &  wasChanged 
)
staticprotected

Snaps the geometry coordinates to the existing clusters in the coordinate index.

Parameters
geometryThe geometry to be snapped
distanceThe distance to be considered when detecting clusters and snapping geometries
coordIndexThe coordinate index containing the clusters

◆ snapCoordinates() [3/4]

static te::gm::GeometryVector te::gm::CoordinateSnapper::snapCoordinates ( const te::gm::GeometryVectorConst vecGeometries,
double  distance,
bool  validateResult,
CoordIndex &  coordIndex 
)
staticprotected

Snaps the geometries coordinates to the existing clusters in the coordinate index.

Parameters
vecGeometriesThe geometries to be snapped
distanceThe distance to be considered when detecting clusters and snapping geometries
coordIndexThe coordinate index containing the clusters

◆ snapCoordinates() [4/4]

static te::gm::GeometryVector te::gm::CoordinateSnapper::snapCoordinates ( const te::gm::GeometryVectorConst vecGeometries,
double  distance,
bool  validateResult = true 
)
static

Algorithm to snap existing "close" coordinates to each other based uppon a given tolerance, ensuring that they now have the exactly same location.

Parameters
vecGeometriesThe geometry list to be analysed
distanceThe distance to be considered for the snapping of the coordinates.
Returns
The resulting snapped geometries

◆ snapToClusters()

static void te::gm::CoordinateSnapper::snapToClusters ( double  distance,
CoordIndex &  coordIndex 
)
staticprotected

Analyses all the coordinates in the coordinate index, detecting clusters and the snapping them to each detected cluster.

Parameters
distanceThe distance to be considered when detecting clusters and snapping geometries
coordIndexThe index to be populated

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