19 #ifndef GEOS_TRIANGULATE_QUADEDGE_QUADEDGESUBDIVISION_H 20 #define GEOS_TRIANGULATE_QUADEDGE_QUADEDGESUBDIVISION_H 25 #include <unordered_set> 28 #include <geos/geom/MultiLineString.h> 29 #include <geos/triangulate/quadedge/QuadEdgeLocator.h> 30 #include <geos/triangulate/quadedge/Vertex.h> 36 class CoordinateSequence;
37 class GeometryCollection;
38 class MultiLineString;
39 class GeometryFactory;
45 namespace triangulate {
49 class TriangleVisitor;
51 const double EDGE_COINCIDENCE_TOL_FACTOR = 1000;
80 typedef std::vector<QuadEdge*> QuadEdgeList;
90 static void getTriangleEdges(
const QuadEdge& startQE,
94 QuadEdgeList quadEdges;
95 QuadEdgeList createdEdges;
98 double edgeCoincidenceTolerance;
101 std::unique_ptr<QuadEdgeLocator> locator;
102 bool visit_state_clean;
120 virtual void initSubdiv(
QuadEdge* initEdges[3]);
151 inline const QuadEdgeList&
167 this->locator = std::move(p_locator);
235 return locator->locate(v);
251 return locator->locate(
Vertex(p));
290 bool isFrameEdge(
const QuadEdge& e)
const;
300 bool isFrameBorderEdge(
const QuadEdge& e)
const;
308 bool isFrameVertex(
const Vertex& v)
const;
342 std::unique_ptr<QuadEdgeList> getPrimaryEdges(
bool includeFrame);
351 typedef std::stack<QuadEdge*> QuadEdgeStack;
352 typedef std::vector<std::unique_ptr<geom::CoordinateSequence>> TriList;
377 QuadEdge** fetchTriangleToVisit(
QuadEdge* edge, QuadEdgeStack& edgeStack,
bool includeFrame);
385 void getTriangleCoordinates(TriList* triList,
bool includeFrame);
388 class TriangleCoordinatesVisitor;
389 class TriangleCircumcentreVisitor;
439 std::unique_ptr<geom::MultiLineString> getVoronoiDiagramEdges(
const geom::GeometryFactory& geomFact);
452 std::vector<std::unique_ptr<geom::Geometry>> getVoronoiCellPolygons(
const geom::GeometryFactory& geomFact);
465 std::vector<std::unique_ptr<geom::Geometry>> getVoronoiCellEdges(
const geom::GeometryFactory& geomFact);
480 std::unique_ptr<QuadEdgeSubdivision::QuadEdgeList> getVertexUniqueEdges(
bool includeFrame);
514 #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,...
Definition: QuadEdgeSubdivision.h:249
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:233
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
Models a site (node) in a QuadEdgeSubdivision.
Definition: Vertex.h:59
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:68
const QuadEdgeList & getEdges() const
Gets the collection of base QuadEdges (one for every pair of vertices which is connected).
Definition: QuadEdgeSubdivision.h:152
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: IndexedNestedRingTester.h:25
const geom::Envelope & getEnvelope() const
Gets the envelope of the Subdivision (including the frame).
Definition: QuadEdgeSubdivision.h:140
void setLocator(std::unique_ptr< QuadEdgeLocator > p_locator)
Sets the QuadEdgeLocator to use for locating containing triangles in this subdivision.
Definition: QuadEdgeSubdivision.h:165
A class that represents the edge data structure which implements the quadedge algebra.
Definition: QuadEdge.h:51
double getTolerance() const
Gets the vertex-equality tolerance value used in this subdivision.
Definition: QuadEdgeSubdivision.h:129