21 #ifndef GEOS_OP_POLYGONIZE_EDGERING_H 22 #define GEOS_OP_POLYGONIZE_EDGERING_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 {
60 namespace polygonize {
70 typedef std::vector<const PolygonizeDirectedEdge*>
DeList;
74 std::unique_ptr<geom::LinearRing>
ring;
75 std::unique_ptr<geom::CoordinateArraySequence>
ringPts;
76 std::unique_ptr<algorithm::locate::PointOnGeometryLocator>
ringLocator;
78 std::unique_ptr<std::vector<std::unique_ptr<geom::LinearRing>>>
holes;
82 bool is_processed =
false;
83 bool is_included_set =
false;
84 bool is_included =
false;
85 bool visitedByUpdateIncludedRecursive =
false;
100 if (ringLocator ==
nullptr) {
103 return ringLocator.get();
132 EdgeRing* findEdgeRingContaining(
const std::vector<EdgeRing*> & erList);
194 return is_included_set;
205 is_included = included;
206 is_included_set =
true;
214 is_processed = processed;
232 return shell !=
nullptr;
242 return isHole() ? shell :
this;
265 return getOuterHole() !=
nullptr;
283 void updateIncludedRecursive();
302 std::unique_ptr<geom::Polygon> getPolygon();
318 std::unique_ptr<geom::LineString> getLineString();
336 std::unique_ptr<geom::LinearRing> getRingOwnership();
351 #endif // GEOS_OP_POLYGONIZE_EDGERING_H Determines the location of Coordinates relative to an areal geometry, using indexing for efficiency...
The default implementation of CoordinateSequence.
std::unique_ptr< geom::CoordinateArraySequence > ringPts
const geom::GeometryFactory * factory
Coordinate is the lightweight class used to store coordinates.
bool hasShell() const
Tests whether this ring has a shell assigned to it.
std::vector< const PolygonizeDirectedEdge * > DeList
An interface for classes which determine the Location of points in Polygon or MultiPolygon geometries...
bool isInRing(const geom::Coordinate &pt)
A DirectedEdge of a PolygonizeGraph, which represents an edge of a polygon formed by the graph...
void setShell(EdgeRing *shellRing)
Sets the containing shell ring of a ring that has been determined to be a hole.
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
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...
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...
Represents a ring of PolygonizeDirectedEdge which form a ring of a polygon. The ring may be either an...
Basic namespace for all GEOS functionalities.
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple...
algorithm::locate::PointOnGeometryLocator * getLocator()
The internal representation of a list of coordinates inside a Geometry.
std::unique_ptr< algorithm::locate::PointOnGeometryLocator > ringLocator
std::unique_ptr< geom::LinearRing > ring
std::unique_ptr< std::vector< std::unique_ptr< geom::LinearRing > > > holes
void setIncluded(bool included)
bool isOuterShell() const
Tests whether this ring is an outer shell.
void setProcessed(bool processed)
bool isHole() const
Tests whether this ring is a hole.
bool isIncludedSet() const