22 #include <geos/export.h> 23 #include <geos/algorithm/locate/IndexedPointInAreaLocator.h> 24 #include <geos/operation/polygonize/PolygonizeDirectedEdge.h> 25 #include <geos/geom/Geometry.h> 26 #include <geos/geom/LinearRing.h> 27 #include <geos/geom/Polygon.h> 31 #include <geos/geom/Location.h> 35 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class 42 class CoordinateSequence;
43 class GeometryFactory;
46 namespace planargraph {
53 namespace polygonize {
63 typedef std::vector<const PolygonizeDirectedEdge*> DeList;
67 std::unique_ptr<geom::LinearRing> ring;
68 std::unique_ptr<geom::CoordinateArraySequence> ringPts;
69 std::unique_ptr<algorithm::locate::PointOnGeometryLocator> ringLocator;
71 std::unique_ptr<std::vector<std::unique_ptr<geom::LinearRing>>> holes;
75 bool is_processed =
false;
76 bool is_included_set =
false;
77 bool is_included =
false;
78 bool visitedByUpdateIncludedRecursive =
false;
93 if (ringLocator ==
nullptr) {
96 return ringLocator.get();
125 EdgeRing* findEdgeRingContaining(
const std::vector<EdgeRing*> & erList);
186 bool isIncludedSet()
const {
187 return is_included_set;
193 bool isIncluded()
const {
197 void setIncluded(
bool included) {
198 is_included = included;
199 is_included_set =
true;
202 bool isProcessed()
const {
206 void setProcessed(
bool processed) {
207 is_processed = processed;
225 return shell !=
nullptr;
235 return isHole() ? shell :
this;
258 return getOuterHole() !=
nullptr;
276 void updateIncludedRecursive();
295 std::unique_ptr<geom::Polygon> getPolygon();
311 std::unique_ptr<geom::LineString> getLineString();
329 std::unique_ptr<geom::LinearRing> getRingOwnership();
Determines the location of Coordinates relative to an areal geometry, using indexing for efficiency...
Definition: IndexedPointInAreaLocator.h:54
The default implementation of CoordinateSequence.
Definition: CoordinateArraySequence.h:35
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:58
An interface for classes which determine the Location of points in Polygon or MultiPolygon geometries...
Definition: PointOnGeometryLocator.h:36
A DirectedEdge of a PolygonizeGraph, which represents an edge of a polygon formed by the graph...
Definition: PolygonizeDirectedEdge.h:52
void setShell(EdgeRing *shellRing)
Sets the containing shell ring of a ring that has been determined to be a hole.
Definition: operation/polygonize/EdgeRing.h:215
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:66
EdgeRing * getShell()
Gets the shell for this ring. The shell is the ring itself if it is not a hole, otherwise it is the p...
Definition: operation/polygonize/EdgeRing.h:234
Represents a ring of PolygonizeDirectedEdge which form a ring of a polygon. The ring may be either an...
Definition: operation/polygonize/EdgeRing.h:59
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
bool isHole() const
Tests whether this ring is a hole.
Definition: operation/polygonize/EdgeRing.h:179
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple...
Definition: LinearRing.h:55
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:44
bool isOuterShell() const
Tests whether this ring is an outer shell.
Definition: operation/polygonize/EdgeRing.h:257
bool isOuterHole() const
Tests whether this ring is an outer hole. A hole is an outer hole if it is not contained by any shell...
Definition: operation/polygonize/EdgeRing.h:244
bool hasShell() const
Tests whether this ring has a shell assigned to it.
Definition: operation/polygonize/EdgeRing.h:224