GEOS  3.6.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 
24 
25 namespace geos {
26  namespace geom{
27  class CoordinateSequence;
28  class Geometry;
29  class MultiLineString;
30  class GeometryCollection;
31  class GeometryFactory;
32  class Envelope;
33  }
34  namespace triangulate {
35  namespace quadedge {
36  class QuadEdgeSubdivision;
37  }
38  }
39 }
40 
41 namespace geos {
42 namespace triangulate { //geos.triangulate
43 
44 
55 {
56 public:
62  static geom::CoordinateSequence* extractUniqueCoordinates(const geom::Geometry& geom);
63 
64  static void unique(geom::CoordinateSequence& coords);
65 
71  static IncrementalDelaunayTriangulator::VertexList* toVertices(const geom::CoordinateSequence &coords);
72 
73 private:
74  geom::CoordinateSequence* siteCoords;
75  double tolerance;
77 
78 public:
84 
86 
93  void setSites(const geom::Geometry& geom);
94 
101  void setSites(const geom::CoordinateSequence& coords);
102 
110  inline void setTolerance(double tolerance)
111  {
112  this->tolerance = tolerance;
113  }
114 
115 private:
116  void create();
117 
118 public:
124  quadedge::QuadEdgeSubdivision& getSubdivision();
125 
132  std::auto_ptr<geom::MultiLineString> getEdges(const geom::GeometryFactory &geomFact);
133 
141  std::auto_ptr<geom::GeometryCollection> getTriangles(const geom::GeometryFactory& geomFact);
142 
150  static geom::Envelope envelope(const geom::CoordinateSequence& coords);
151 
152 };
153 
154 } //namespace geos.triangulate
155 } //namespace goes
156 
157 #endif //GEOS_TRIANGULATE_QUADEDGE_DELAUNAYTRIANGULATIONBUILDER_H
158 
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:53
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:167
Definition: DelaunayTriangulationBuilder.h:54
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:67
void setTolerance(double tolerance)
Definition: DelaunayTriangulationBuilder.h:110
Definition: QuadEdgeSubdivision.h:79
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:59