19 #ifndef GEOS_OP_OVERLAY_POLYGONBUILDER_H
20 #define GEOS_OP_OVERLAY_POLYGONBUILDER_H
22 #include <geos/export.h>
23 #include <geos/algorithm/locate/IndexedPointInAreaLocator.h>
29 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
37 class GeometryFactory;
47 class MaximalEdgeRing;
48 class MinimalEdgeRing;
62 class GEOS_DLL PolygonBuilder {
65 PolygonBuilder(
const geom::GeometryFactory* newGeometryFactory);
74 void add(geomgraph::PlanarGraph* graph);
82 void add(
const std::vector<geomgraph::DirectedEdge*>* dirEdges,
83 const std::vector<geomgraph::Node*>* nodes);
86 std::vector<geom::Geometry*>* getPolygons();
90 const geom::GeometryFactory* geometryFactory;
92 std::vector<geomgraph::EdgeRing*> shellList;
101 void buildMaximalEdgeRings(
102 const std::vector<geomgraph::DirectedEdge*>* dirEdges,
103 std::vector<MaximalEdgeRing*>& maxEdgeRings);
106 void buildMinimalEdgeRings(
107 std::vector<MaximalEdgeRing*>& maxEdgeRings,
108 std::vector<geomgraph::EdgeRing*>& newShellList,
109 std::vector<geomgraph::EdgeRing*>& freeHoleList,
110 std::vector<MaximalEdgeRing*>& edgeRings);
123 geomgraph::EdgeRing* findShell(std::vector<MinimalEdgeRing*>* minEdgeRings);
136 void placePolygonHoles(geomgraph::EdgeRing* shell,
137 std::vector<MinimalEdgeRing*>* minEdgeRings);
146 void sortShellsAndHoles(std::vector<MaximalEdgeRing*>& edgeRings,
147 std::vector<geomgraph::EdgeRing*>& newShellList,
148 std::vector<geomgraph::EdgeRing*>& freeHoleList);
151 geomgraph::EdgeRing* edgeRing;
152 algorithm::locate::IndexedPointInAreaLocator* pipLocator;
169 void placeFreeHoles(std::vector<FastPIPRing>& newShellList,
170 std::vector<geomgraph::EdgeRing*>& freeHoleList);
191 geomgraph::EdgeRing* findEdgeRingContaining(geomgraph::EdgeRing* testEr,
192 std::vector<FastPIPRing>& newShellList);
194 std::vector<geom::Geometry*>* computePolygons(
195 std::vector<geomgraph::EdgeRing*>& newShellList);
212 #endif // ndef GEOS_OP_OVERLAY_POLYGONBUILDER_H