GEOS 3.14.0dev
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#pragma once
20
21#include <geos/triangulate/IncrementalDelaunayTriangulator.h>
22#include <geos/geom/CoordinateSequence.h>
23
24#include <memory>
25
26namespace geos {
27namespace geom {
28class Geometry;
29class MultiLineString;
30class GeometryCollection;
31class GeometryFactory;
32class Envelope;
33}
34namespace triangulate {
35namespace quadedge {
36class QuadEdgeSubdivision;
37}
38}
39}
40
41namespace geos {
42namespace triangulate { //geos.triangulate
43
44
55public:
63 static std::unique_ptr<geom::CoordinateSequence> extractUniqueCoordinates(const geom::Geometry& geom);
64
72 static IncrementalDelaunayTriangulator::VertexList toVertices(const geom::CoordinateSequence& coords);
73
79 static std::unique_ptr<geom::CoordinateSequence> unique(const geom::CoordinateSequence* seq);
80
81private:
82 std::unique_ptr<geom::CoordinateSequence> siteCoords;
83 double tolerance;
84 std::unique_ptr<quadedge::QuadEdgeSubdivision> subdiv;
85
86public:
92
94
101 void setSites(const geom::Geometry& geom);
102
110
118 inline void
119 setTolerance(double p_tolerance)
120 {
121 this->tolerance = p_tolerance;
122 }
123
124private:
125 void create();
126
127public:
134
141 std::unique_ptr<geom::MultiLineString> getEdges(const geom::GeometryFactory& geomFact);
142
150 std::unique_ptr<geom::GeometryCollection> getTriangles(const geom::GeometryFactory& geomFact);
151
161
162};
163
164} //namespace geos.triangulate
165} //namespace goes
166
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:56
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition Envelope.h:59
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition GeometryFactory.h:70
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:197
A utility class which creates Delaunay Triangulations from collections of points and extract the resu...
Definition DelaunayTriangulationBuilder.h:54
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:119
A class that contains the QuadEdges representing a planar subdivision that models a triangulation.
Definition QuadEdgeSubdivision.h:78
Basic namespace for all GEOS functionalities.
Definition geos.h:39