20 #ifndef GEOS_TRIANGULATE_QUADEDGE_QUADEDGESUBDIVISION_H 21 #define GEOS_TRIANGULATE_QUADEDGE_QUADEDGESUBDIVISION_H 26 #include <unordered_set> 29 #include <geos/geom/MultiLineString.h> 30 #include <geos/triangulate/quadedge/QuadEdge.h> 31 #include <geos/triangulate/quadedge/QuadEdgeLocator.h> 32 #include <geos/triangulate/quadedge/QuadEdgeQuartet.h> 33 #include <geos/triangulate/quadedge/Vertex.h> 39 class CoordinateSequence;
40 class GeometryCollection;
41 class MultiLineString;
42 class GeometryFactory;
48 namespace triangulate {
51 class TriangleVisitor;
53 const double EDGE_COINCIDENCE_TOL_FACTOR = 1000;
82 typedef std::vector<QuadEdge*> QuadEdgeList;
92 static void getTriangleEdges(
const QuadEdge& startQE,
100 std::deque<QuadEdgeQuartet> quadEdges;
101 std::array<QuadEdge*, 3> startingEdges;
103 double edgeCoincidenceTolerance;
104 std::array<Vertex, 3> frameVertex;
106 std::unique_ptr<QuadEdgeLocator> locator;
107 bool visit_state_clean;
125 virtual void initSubdiv();
156 inline std::deque<QuadEdgeQuartet>&
172 this->locator = std::move(p_locator);
239 return locator->locate(v);
255 return locator->locate(
Vertex(p));
294 bool isFrameEdge(
const QuadEdge& e)
const;
304 bool isFrameBorderEdge(
const QuadEdge& e)
const;
312 bool isFrameVertex(
const Vertex& v)
const;
346 std::unique_ptr<QuadEdgeList> getPrimaryEdges(
bool includeFrame);
355 typedef std::stack<QuadEdge*> QuadEdgeStack;
356 typedef std::vector<std::unique_ptr<geom::CoordinateSequence>> TriList;
381 QuadEdge** fetchTriangleToVisit(
QuadEdge* edge, QuadEdgeStack& edgeStack,
bool includeFrame);
389 void getTriangleCoordinates(TriList* triList,
bool includeFrame);
392 class TriangleCoordinatesVisitor;
393 class TriangleCircumcentreVisitor;
443 std::unique_ptr<geom::MultiLineString> getVoronoiDiagramEdges(
const geom::GeometryFactory& geomFact);
456 std::vector<std::unique_ptr<geom::Geometry>> getVoronoiCellPolygons(
const geom::GeometryFactory& geomFact);
469 std::vector<std::unique_ptr<geom::Geometry>> getVoronoiCellEdges(
const geom::GeometryFactory& geomFact);
484 std::unique_ptr<QuadEdgeSubdivision::QuadEdgeList> getVertexUniqueEdges(
bool includeFrame);
518 #endif //GEOS_TRIANGULATE_QUADEDGE_QUADEDGESUBDIVISION_H An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:58
QuadEdge * locate(const geom::Coordinate &p)
Finds a quadedge of a triangle containing a location specified by a geom::Coordinate, if one exists.
Definition: QuadEdgeSubdivision.h:253
An interface for algorithms which process the triangles in a QuadEdgeSubdivision. ...
Definition: TriangleVisitor.h:34
QuadEdge * locate(const Vertex &v) const
Finds a quadedge of a triangle containing a location specified by a Vertex, if one exists...
Definition: QuadEdgeSubdivision.h:237
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
Models a site (node) in a QuadEdgeSubdivision.
Definition: Vertex.h:60
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:68
std::deque< QuadEdgeQuartet > & getEdges()
Gets the collection of base QuadEdges (one for every pair of vertices which is connected).
Definition: QuadEdgeSubdivision.h:157
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
const geom::Envelope & getEnvelope() const
Gets the envelope of the Subdivision (including the frame).
Definition: QuadEdgeSubdivision.h:145
void setLocator(std::unique_ptr< QuadEdgeLocator > p_locator)
Sets the QuadEdgeLocator to use for locating containing triangles in this subdivision.
Definition: QuadEdgeSubdivision.h:170
A class that represents the edge data structure which implements the quadedge algebra.
Definition: QuadEdge.h:54
double getTolerance() const
Gets the vertex-equality tolerance value used in this subdivision.
Definition: QuadEdgeSubdivision.h:134