23 #include <geos/export.h> 24 #include <geos/geom/Polygon.h> 25 #include <geos/geom/GeometryComponentFilter.h> 26 #include <geos/operation/polygonize/PolygonizeGraph.h> 33 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class 46 namespace polygonize {
54 namespace polygonize {
96 LineStringAdder lineStringAdder;
110 static void findValidRings(
const std::vector<EdgeRing*>& edgeRingList,
111 std::vector<EdgeRing*>& validEdgeRingList,
112 std::vector<EdgeRing*>& invalidRingList);
119 std::vector<std::unique_ptr<geom::LineString>> extractInvalidLines(
120 std::vector<EdgeRing*>& invalidRings);
137 bool isIncludedInvalid(
EdgeRing* invalidRing);
139 void findShellsAndHoles(
const std::vector<EdgeRing*>& edgeRingList);
141 void findDisjointShells();
143 static void findOuterShells(std::vector<EdgeRing*>& shellList);
145 static std::vector<std::unique_ptr<geom::Polygon>> extractPolygons(std::vector<EdgeRing*> & shellList,
bool includeAll);
147 bool extractOnlyPolygonal;
152 std::unique_ptr<PolygonizeGraph> graph;
155 std::vector<const geom::LineString*> dangles;
156 std::vector<const geom::LineString*> cutEdges;
157 std::vector<std::unique_ptr<geom::LineString>> invalidRingLines;
159 std::vector<EdgeRing*> holeList;
160 std::vector<EdgeRing*> shellList;
161 std::vector<std::unique_ptr<geom::Polygon>> polyList;
183 void add(std::vector<geom::Geometry*>* geomList);
193 void add(std::vector<const geom::Geometry*>* geomList);
222 std::vector<std::unique_ptr<geom::Polygon>> getPolygons();
231 const std::vector<const geom::LineString*>& getDangles();
242 const std::vector<const geom::LineString*>& getCutEdges();
254 const std::vector<std::unique_ptr<geom::LineString>>& getInvalidRingLines();
256 bool hasInvalidRingLines();
258 bool allInputsFormPolygons();
261 friend class Polygonizer::LineStringAdder;
Polygonizes a set of Geometrys which contain linework that represents the edges of a planar graph...
Definition: Polygonizer.h:82
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
Definition: LineString.h:65
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
Definition: GeometryComponentFilter.h:41