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)
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::vector<std::unique_ptr<geom::Polygon>> extractPolygons(std::vector<EdgeRing*> & shellList,
bool includeAll);
123 bool extractOnlyPolygonal;
128 std::unique_ptr<PolygonizeGraph> graph;
131 std::vector<const geom::LineString*> dangles;
132 std::vector<const geom::LineString*> cutEdges;
133 std::vector<std::unique_ptr<geom::LineString>> invalidRingLines;
135 std::vector<EdgeRing*> holeList;
136 std::vector<EdgeRing*> shellList;
137 std::vector<std::unique_ptr<geom::Polygon>> polyList;
159 void add(std::vector<geom::Geometry*>* geomList);
169 void add(std::vector<const geom::Geometry*>* geomList);
232 bool hasInvalidRingLines();
234 bool allInputsFormPolygons();
237 friend class Polygonizer::LineStringAdder;
Definition: GeometryComponentFilter.h:43
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
Definition: LineString.h:68
Polygonizes a set of Geometrys which contain linework that represents the edges of a planar graph.
Definition: Polygonizer.h:83
void add(std::vector< const geom::Geometry * > *geomList)
Add a collection of geometries to be polygonized. May be called multiple times. Any dimension of Geom...
const std::vector< const geom::LineString * > & getDangles()
Get the list of dangling lines found during polygonization.
Polygonizer(bool onlyPolygonal=false)
Create a Polygonizer with the same GeometryFactory as the input Geometrys.
void add(const geom::Geometry *g)
void add(geom::Geometry *g)
const std::vector< std::unique_ptr< geom::LineString > > & getInvalidRingLines()
Get the list of lines forming invalid rings found during polygonization.
const std::vector< const geom::LineString * > & getCutEdges()
Get the list of cut edges found during polygonization.
std::vector< std::unique_ptr< geom::Polygon > > getPolygons()
Gets the list of polygons formed by the polygonization.
void add(std::vector< geom::Geometry * > *geomList)
Add a collection of geometries to be polygonized. May be called multiple times. Any dimension of Geom...
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26