22 #ifndef GEOS_GEOMGRAPH_GEOMETRYGRAPH_H
23 #define GEOS_GEOMGRAPH_GEOMETRYGRAPH_H
25 #include <geos/export.h>
27 #include <unordered_map>
31 #include <geos/geom/Coordinate.h>
32 #include <geos/geom/CoordinateSequence.h>
33 #include <geos/geomgraph/PlanarGraph.h>
34 #include <geos/geomgraph/index/SegmentIntersector.h>
35 #include <geos/geom/LineString.h>
37 #include <geos/inline.h>
41 #pragma warning(disable: 4251)
51 class GeometryCollection;
56 class LineIntersector;
57 class BoundaryNodeRule;
63 class EdgeSetIntersector;
75 using PlanarGraph::add;
90 std::unordered_map<const geom::LineString*, Edge*> lineEdgeMap;
96 bool useBoundaryDeterminationRule;
107 std::unique_ptr< geom::CoordinateSequence > boundaryPoints;
109 std::unique_ptr< std::vector<Node*> > boundaryNodes;
111 bool hasTooFewPointsVar;
142 void insertBoundaryPoint(uint8_t p_argIndex,
const geom::Coordinate& coord);
144 void addSelfIntersectionNodes(uint8_t p_argIndex);
153 void addSelfIntersectionNode(uint8_t p_argIndex,
162 static bool isInBoundary(
int boundaryCount);
183 void getBoundaryNodes(std::vector<Node*>& bdyNodes);
190 void computeSplitEdges(std::vector<Edge*>* edgelist);
192 void addEdge(
Edge* e);
210 std::unique_ptr<index::SegmentIntersector>
213 bool computeRingSelfNodes,
216 return computeSelfNodes(*li, computeRingSelfNodes, env);
219 std::unique_ptr<index::SegmentIntersector>
222 bool computeRingSelfNodes,
223 bool isDoneIfProperInt,
226 return computeSelfNodes(*li, computeRingSelfNodes, isDoneIfProperInt, env);
231 std::unique_ptr<index::SegmentIntersector> computeSelfNodes(
235 std::unique_ptr<index::SegmentIntersector> computeSelfNodes(
237 bool computeRingSelfNodes,
bool isDoneIfProperInt,
const geom::Envelope* env =
nullptr);
239 std::unique_ptr<index::SegmentIntersector> computeEdgeIntersections(GeometryGraph* g,
243 std::vector<Edge*>* getEdges();
245 bool hasTooFewPoints();
250 getBoundaryNodeRule()
const
252 return boundaryNodeRule;
266 # include "geos/geomgraph/GeometryGraph.inl"
An interface for rules which determine whether node points which are in boundaries of lineal geometry...
Definition: BoundaryNodeRule.h:51
A LineIntersector is an algorithm that can both test whether two line segments intersect and compute ...
Definition: LineIntersector.h:50
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:58
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:58
Represents a collection of heterogeneous Geometry objects.
Definition: GeometryCollection.h:55
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
Definition: LineString.h:68
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition: LinearRing.h:57
Represents a linear polygon, which may include holes.
Definition: Polygon.h:64
Definition: geomgraph/Edge.h:66
A GeometryGraph is a graph that models a given Geometry.
Definition: GeometryGraph.h:74
geom::CoordinateSequence * getBoundaryPoints()
Returned object is owned by this GeometryGraph.
std::unique_ptr< index::SegmentIntersector > computeSelfNodes(algorithm::LineIntersector *li, bool computeRingSelfNodes, const geom::Envelope *env=nullptr)
Compute self-nodes, taking advantage of the Geometry type to minimize the number of intersection test...
Definition: GeometryGraph.h:211
std::vector< Node * > * getBoundaryNodes()
Returned object is owned by this GeometryGraph.
Represents a directed graph which is embeddable in a planar surface.
Definition: geomgraph/PlanarGraph.h:75
virtual Edge * findEdge(const geom::Coordinate &p0, const geom::Coordinate &p1)
Returns the edge whose first two coordinates are p0 and p1.
An EdgeSetIntersector computes all the intersections between the edges in the set.
Definition: EdgeSetIntersector.h:41
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:34
Basic namespace for all GEOS functionalities.
Definition: Angle.h:26