GEOS 3.14.0dev
Public Member Functions | Static Public Member Functions | List of all members
geos::triangulate::DelaunayTriangulationBuilder Class Reference

A utility class which creates Delaunay Triangulations from collections of points and extract the resulting triangulation edges or triangles as geometries. More...

#include <DelaunayTriangulationBuilder.h>

Public Member Functions

 DelaunayTriangulationBuilder ()
 
void setSites (const geom::Geometry &geom)
 
void setSites (const geom::CoordinateSequence &coords)
 
void setTolerance (double p_tolerance)
 
quadedge::QuadEdgeSubdivisiongetSubdivision ()
 
std::unique_ptr< geom::MultiLineStringgetEdges (const geom::GeometryFactory &geomFact)
 
std::unique_ptr< geom::GeometryCollectiongetTriangles (const geom::GeometryFactory &geomFact)
 

Static Public Member Functions

static std::unique_ptr< geom::CoordinateSequenceextractUniqueCoordinates (const geom::Geometry &geom)
 
static IncrementalDelaunayTriangulator::VertexList toVertices (const geom::CoordinateSequence &coords)
 
static std::unique_ptr< geom::CoordinateSequenceunique (const geom::CoordinateSequence *seq)
 
static geom::Envelope envelope (const geom::CoordinateSequence &coords)
 

Detailed Description

A utility class which creates Delaunay Triangulations from collections of points and extract the resulting triangulation edges or triangles as geometries.

Author
JTS: Martin Davis
Benjamin Campbell

Constructor & Destructor Documentation

◆ DelaunayTriangulationBuilder()

geos::triangulate::DelaunayTriangulationBuilder::DelaunayTriangulationBuilder ( )

Creates a new triangulation builder.

Member Function Documentation

◆ envelope()

static geom::Envelope geos::triangulate::DelaunayTriangulationBuilder::envelope ( const geom::CoordinateSequence coords)
static

Computes the geom::Envelope of a collection of geom::Coordinates.

Parameters
coordsa List of Coordinates
Returns
the envelope of the set of coordinates

◆ extractUniqueCoordinates()

static std::unique_ptr< geom::CoordinateSequence > geos::triangulate::DelaunayTriangulationBuilder::extractUniqueCoordinates ( const geom::Geometry geom)
static

Extracts the unique geom::Coordinates from the given geom::Geometry.

Parameters
geomthe geometry to extract from
Returns
a List of the unique Coordinates. Caller takes ownership of the returned object.

◆ getEdges()

std::unique_ptr< geom::MultiLineString > geos::triangulate::DelaunayTriangulationBuilder::getEdges ( const geom::GeometryFactory geomFact)

Gets the edges of the computed triangulation as a geom::MultiLineString.

Parameters
geomFactthe geometry factory to use to create the output
Returns
the edges of the triangulation. The caller takes ownership of the returned object.

◆ getSubdivision()

quadedge::QuadEdgeSubdivision & geos::triangulate::DelaunayTriangulationBuilder::getSubdivision ( )

Gets the quadedge::QuadEdgeSubdivision which models the computed triangulation.

Returns
the subdivision containing the triangulation

◆ getTriangles()

std::unique_ptr< geom::GeometryCollection > geos::triangulate::DelaunayTriangulationBuilder::getTriangles ( const geom::GeometryFactory geomFact)

Gets the faces of the computed triangulation as a geom::GeometryCollection of geom::Polygon.

Parameters
geomFactthe geometry factory to use to create the output
Returns
the faces of the triangulation. The caller takes ownership of the returned object.

◆ setSites() [1/2]

void geos::triangulate::DelaunayTriangulationBuilder::setSites ( const geom::CoordinateSequence coords)

Sets the sites (vertices) which will be triangulated from a collection of geom::Coordinates.

Parameters
coordsa CoordinateSequence.

◆ setSites() [2/2]

void geos::triangulate::DelaunayTriangulationBuilder::setSites ( const geom::Geometry geom)

Sets the sites (vertices) which will be triangulated. All vertices of the given geometry will be used as sites.

Parameters
geomthe geometry from which the sites will be extracted.

◆ setTolerance()

void geos::triangulate::DelaunayTriangulationBuilder::setTolerance ( double  p_tolerance)
inline

Sets the snapping tolerance which will be used to improved the robustness of the triangulation computation. A tolerance of 0.0 specifies that no snapping will take place.

Parameters
p_tolerancethe tolerance distance to use

◆ toVertices()

static IncrementalDelaunayTriangulator::VertexList geos::triangulate::DelaunayTriangulationBuilder::toVertices ( const geom::CoordinateSequence coords)
static

Converts all geom::Coordinates in a collection to quadedge::Vertexes.

Parameters
coordsthe coordinates to convert
Returns
a List of Vertex objects.

◆ unique()

static std::unique_ptr< geom::CoordinateSequence > geos::triangulate::DelaunayTriangulationBuilder::unique ( const geom::CoordinateSequence seq)
static

Returns a CoordinateSequence containing only the unique coordinates of its input.

Parameters
seqa coordinateSequence
Returns
a sorted CoordinateSequence with the unique points of seq.

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