20 #ifndef GEOS_TRIANGULATE_QUADEDGE_QUADEDGESUBDIVISION_H 21 #define GEOS_TRIANGULATE_QUADEDGE_QUADEDGESUBDIVISION_H 26 #include <unordered_set> 30 #include <geos/geom/MultiLineString.h> 31 #include <geos/triangulate/quadedge/QuadEdge.h> 32 #include <geos/triangulate/quadedge/QuadEdgeLocator.h> 33 #include <geos/triangulate/quadedge/QuadEdgeQuartet.h> 34 #include <geos/triangulate/quadedge/Vertex.h> 40 class CoordinateSequence;
41 class GeometryCollection;
42 class MultiLineString;
43 class GeometryFactory;
49 namespace triangulate {
52 class TriangleVisitor;
54 const double EDGE_COINCIDENCE_TOL_FACTOR = 1000;
83 typedef std::vector<QuadEdge*> QuadEdgeList;
93 static void getTriangleEdges(
const QuadEdge& startQE,
101 std::deque<QuadEdgeQuartet> quadEdges;
102 std::array<QuadEdge*, 3> startingEdges;
104 double edgeCoincidenceTolerance;
105 std::array<Vertex, 3> frameVertex;
107 std::unique_ptr<QuadEdgeLocator> locator;
108 bool visit_state_clean;
126 virtual void initSubdiv();
157 inline std::deque<QuadEdgeQuartet>&
173 this->locator = std::move(p_locator);
240 return locator->locate(v);
256 return locator->locate(
Vertex(p));
295 bool isFrameEdge(
const QuadEdge& e)
const;
305 bool isFrameBorderEdge(
const QuadEdge& e)
const;
313 bool isFrameVertex(
const Vertex& v)
const;
347 std::unique_ptr<QuadEdgeList> getPrimaryEdges(
bool includeFrame);
356 typedef std::stack<QuadEdge*> QuadEdgeStack;
357 typedef std::vector<std::unique_ptr<geom::CoordinateSequence>> TriList;
364 std::array<QuadEdge*, 3> m_triEdges;
382 std::array<QuadEdge*, 3>* fetchTriangleToVisit(
QuadEdge* edge, QuadEdgeStack& edgeStack,
bool includeFrame);
390 void getTriangleCoordinates(TriList* triList,
bool includeFrame);
393 class TriangleCoordinatesVisitor;
394 class TriangleCircumcentreVisitor;
444 std::unique_ptr<geom::MultiLineString> getVoronoiDiagramEdges(
const geom::GeometryFactory& geomFact);
457 std::vector<std::unique_ptr<geom::Geometry>> getVoronoiCellPolygons(
const geom::GeometryFactory& geomFact);
470 std::vector<std::unique_ptr<geom::Geometry>> getVoronoiCellEdges(
const geom::GeometryFactory& geomFact);
485 std::unique_ptr<QuadEdgeSubdivision::QuadEdgeList> getVertexUniqueEdges(
bool includeFrame);
519 #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:254
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:238
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
Models a site (node) in a QuadEdgeSubdivision.
Definition: Vertex.h:61
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:158
A class that contains the QuadEdges representing a planar subdivision that models a triangulation...
Definition: QuadEdgeSubdivision.h:81
Basic namespace for all GEOS functionalities.
Definition: Angle.h:26
const geom::Envelope & getEnvelope() const
Gets the envelope of the Subdivision (including the frame).
Definition: QuadEdgeSubdivision.h:146
void setLocator(std::unique_ptr< QuadEdgeLocator > p_locator)
Sets the QuadEdgeLocator to use for locating containing triangles in this subdivision.
Definition: QuadEdgeSubdivision.h:171
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:135