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)
96 LineStringAdder lineStringAdder;
110 static void findValidRings(
const std::vector<EdgeRing*>& edgeRingList,
111 std::vector<EdgeRing*>& validEdgeRingList,
112 std::vector<std::unique_ptr<geom::LineString>>& invalidRingList);
114 void findShellsAndHoles(
const std::vector<EdgeRing*>& edgeRingList);
116 void findDisjointShells();
118 static void findOuterShells(std::vector<EdgeRing*>& shellList);
120 static std::vector<std::unique_ptr<geom::Polygon>> extractPolygons(std::vector<EdgeRing*> & shellList,
bool includeAll);
122 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::vector<std::unique_ptr<geom::Polygon>> polyList;
158 void add(std::vector<geom::Geometry*>* geomList);
168 void add(std::vector<const geom::Geometry*>* geomList);
231 bool hasInvalidRingLines();
233 bool allInputsFormPolygons();
236 friend class Polygonizer::LineStringAdder;
Definition: GeometryComponentFilter.h:41
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
Definition: LineString.h:66
Polygonizes a set of Geometrys which contain linework that represents the edges of a planar graph.
Definition: Polygonizer.h:82
const std::vector< const geom::LineString * > & getDangles()
Get the list of dangling lines found during polygonization.
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...
Polygonizer(bool onlyPolygonal=false)
Create a Polygonizer with the same GeometryFactory as the input Geometrys.
const std::vector< std::unique_ptr< geom::LineString > > & getInvalidRingLines()
Get the list of lines forming invalid rings found during polygonization.
void add(const geom::Geometry *g)
void add(geom::Geometry *g)
const std::vector< const geom::LineString * > & getCutEdges()
Get the list of cut edges found during 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...
std::vector< std::unique_ptr< geom::Polygon > > getPolygons()
Gets the list of polygons formed by the polygonization.
Basic namespace for all GEOS functionalities.
Definition: geos.h:39