21 #ifndef GEOS_OP_POLYGONIZE_EDGERING_H 22 #define GEOS_OP_POLYGONIZE_EDGERING_H 24 #include <geos/export.h> 25 #include <geos/algorithm/locate/IndexedPointInAreaLocator.h> 26 #include <geos/operation/polygonize/PolygonizeDirectedEdge.h> 27 #include <geos/geom/Geometry.h> 28 #include <geos/geom/LinearRing.h> 29 #include <geos/geom/Polygon.h> 33 #include <geos/geom/Location.h> 37 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class 44 class CoordinateSequence;
45 class GeometryFactory;
48 namespace planargraph {
55 namespace polygonize {
65 typedef std::vector<const PolygonizeDirectedEdge*> DeList;
69 std::unique_ptr<geom::LinearRing> ring;
70 std::unique_ptr<geom::CoordinateArraySequence> ringPts;
71 std::unique_ptr<algorithm::locate::PointOnGeometryLocator> ringLocator;
73 std::unique_ptr<std::vector<std::unique_ptr<geom::LinearRing>>> holes;
77 bool is_processed =
false;
78 bool is_included_set =
false;
79 bool is_included =
false;
80 bool visitedByUpdateIncludedRecursive =
false;
95 if (ringLocator ==
nullptr) {
98 return ringLocator.get();
127 EdgeRing* findEdgeRingContaining(
const std::vector<EdgeRing*> & erList);
188 bool isIncludedSet()
const {
189 return is_included_set;
195 bool isIncluded()
const {
199 void setIncluded(
bool included) {
200 is_included = included;
201 is_included_set =
true;
204 bool isProcessed()
const {
208 void setProcessed(
bool processed) {
209 is_processed = processed;
227 return shell !=
nullptr;
237 return isHole() ? shell :
this;
260 return getOuterHole() !=
nullptr;
278 void updateIncludedRecursive();
297 std::unique_ptr<geom::Polygon> getPolygon();
313 std::unique_ptr<geom::LineString> getLineString();
331 std::unique_ptr<geom::LinearRing> getRingOwnership();
346 #endif // GEOS_OP_POLYGONIZE_EDGERING_H Determines the location of Coordinates relative to an areal geometry, using indexing for efficiency...
Definition: IndexedPointInAreaLocator.h:55
The default implementation of CoordinateSequence.
Definition: CoordinateArraySequence.h:37
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
An interface for classes which determine the Location of points in Polygon or MultiPolygon geometries...
Definition: PointOnGeometryLocator.h:37
A DirectedEdge of a PolygonizeGraph, which represents an edge of a polygon formed by the graph...
Definition: PolygonizeDirectedEdge.h:54
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:217
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:68
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:236
Represents a ring of PolygonizeDirectedEdge which form a ring of a polygon. The ring may be either an...
Definition: operation/polygonize/EdgeRing.h:61
Basic namespace for all GEOS functionalities.
Definition: Angle.h:26
bool isHole() const
Tests whether this ring is a hole.
Definition: operation/polygonize/EdgeRing.h:181
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple...
Definition: LinearRing.h:57
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:58
bool isOuterShell() const
Tests whether this ring is an outer shell.
Definition: operation/polygonize/EdgeRing.h:259
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:246
bool hasShell() const
Tests whether this ring has a shell assigned to it.
Definition: operation/polygonize/EdgeRing.h:226