GEOS 3.9.1
DelaunayTriangulationBuilder.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2012 Excensus LLC.
7 *
8 * This is free software; you can redistribute and/or modify it under
9 * the terms of the GNU Lesser General Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 *
13 **********************************************************************
14 *
15 * Last port: triangulate/DelaunayTriangulationBuilder.java r524
16 *
17 **********************************************************************/
18
19#ifndef GEOS_TRIANGULATE_DELAUNAYTRIANGULATIONBUILDER_H
20#define GEOS_TRIANGULATE_DELAUNAYTRIANGULATIONBUILDER_H
21
22#include <geos/triangulate/IncrementalDelaunayTriangulator.h>
23#include <geos/geom/CoordinateSequence.h>
24
25#include <memory>
26
27namespace geos {
28namespace geom {
29class Geometry;
30class MultiLineString;
31class GeometryCollection;
32class GeometryFactory;
33class Envelope;
34}
35namespace triangulate {
36namespace quadedge {
37class QuadEdgeSubdivision;
38}
39}
40}
41
42namespace geos {
43namespace triangulate { //geos.triangulate
44
45
56public:
64 static std::unique_ptr<geom::CoordinateSequence> extractUniqueCoordinates(const geom::Geometry& geom);
65
73 static IncrementalDelaunayTriangulator::VertexList toVertices(const geom::CoordinateSequence& coords);
74
80 static std::unique_ptr<geom::CoordinateSequence> unique(const geom::CoordinateSequence* seq);
81
82private:
83 std::unique_ptr<geom::CoordinateSequence> siteCoords;
84 double tolerance;
85 std::unique_ptr<quadedge::QuadEdgeSubdivision> subdiv;
86
87public:
93
95
102 void setSites(const geom::Geometry& geom);
103
111
119 inline void
120 setTolerance(double p_tolerance)
121 {
122 this->tolerance = p_tolerance;
123 }
124
125private:
126 void create();
127
128public:
135
142 std::unique_ptr<geom::MultiLineString> getEdges(const geom::GeometryFactory& geomFact);
143
151 std::unique_ptr<geom::GeometryCollection> getTriangles(const geom::GeometryFactory& geomFact);
152
162
163};
164
165} //namespace geos.triangulate
166} //namespace goes
167
168#endif //GEOS_TRIANGULATE_QUADEDGE_DELAUNAYTRIANGULATIONBUILDER_H
169
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:58
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:58
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:68
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
A utility class which creates Delaunay Triangulations from collections of points and extract the resu...
Definition: DelaunayTriangulationBuilder.h:55
static std::unique_ptr< geom::CoordinateSequence > unique(const geom::CoordinateSequence *seq)
quadedge::QuadEdgeSubdivision & getSubdivision()
static std::unique_ptr< geom::CoordinateSequence > extractUniqueCoordinates(const geom::Geometry &geom)
static IncrementalDelaunayTriangulator::VertexList toVertices(const geom::CoordinateSequence &coords)
std::unique_ptr< geom::MultiLineString > getEdges(const geom::GeometryFactory &geomFact)
void setSites(const geom::CoordinateSequence &coords)
std::unique_ptr< geom::GeometryCollection > getTriangles(const geom::GeometryFactory &geomFact)
static geom::Envelope envelope(const geom::CoordinateSequence &coords)
void setSites(const geom::Geometry &geom)
void setTolerance(double p_tolerance)
Definition: DelaunayTriangulationBuilder.h:120
A class that contains the QuadEdges representing a planar subdivision that models a triangulation.
Definition: QuadEdgeSubdivision.h:80
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26