21 #ifndef GEOS_OP_POLYGONIZE_POLYGONIZER_H
22 #define GEOS_OP_POLYGONIZE_POLYGONIZER_H
24 #include <geos/export.h>
25 #include <geos/geom/Polygon.h>
26 #include <geos/geom/GeometryComponentFilter.h>
27 #include <geos/operation/polygonize/PolygonizeGraph.h>
34 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
47 namespace polygonize {
55 namespace polygonize {
97 LineStringAdder lineStringAdder;
111 static void findValidRings(
const std::vector<EdgeRing*>& edgeRingList,
112 std::vector<EdgeRing*>& validEdgeRingList,
113 std::vector<std::unique_ptr<geom::LineString>>& invalidRingList);
115 void findShellsAndHoles(
const std::vector<EdgeRing*>& edgeRingList);
117 void findDisjointShells();
119 static void findOuterShells(std::vector<EdgeRing*>& shellList);
121 static std::unique_ptr<std::vector<std::unique_ptr<geom::Polygon>>> extractPolygons(std::vector<EdgeRing*> & shellList,
bool includeAll);
123 bool extractOnlyPolygonal;
127 std::unique_ptr<PolygonizeGraph> graph;
130 std::vector<const geom::LineString*> dangles;
131 std::vector<const geom::LineString*> cutEdges;
132 std::vector<std::unique_ptr<geom::LineString>> invalidRingLines;
134 std::vector<EdgeRing*> holeList;
135 std::vector<EdgeRing*> shellList;
136 std::unique_ptr<std::vector<std::unique_ptr<geom::Polygon>>> polyList;
158 void add(std::vector<geom::Geometry*>* geomList);
168 void add(std::vector<const geom::Geometry*>* geomList);
197 std::unique_ptr<std::vector<std::unique_ptr<geom::Polygon>>> getPolygons();
206 const std::vector<const geom::LineString*>& getDangles();
217 const std::vector<const geom::LineString*>& getCutEdges();
229 const std::vector<std::unique_ptr<geom::LineString>>& getInvalidRingLines();
231 bool hasInvalidRingLines();
233 bool allInputsFormPolygons();
236 friend class Polygonizer::LineStringAdder;
247 #endif // GEOS_OP_POLYGONIZE_POLYGONIZER_H