22 #include <geos/geom/Geometry.h> 23 #include <geos/geom/GeometryFactory.h> 24 #include <geos/operation/overlayng/OverlayGraph.h> 25 #include <geos/operation/overlayng/OverlayEdgeRing.h> 26 #include <geos/operation/overlayng/InputGeometry.h> 27 #include <geos/export.h> 32 class GeometryFactory;
126 InputGeometry inputGeom;
132 bool isAreaResultOnly;
134 bool isOutputResultEdges;
135 bool isOutputNodedEdges;
138 std::unique_ptr<geom::Geometry> computeEdgeOverlay();
155 std::unique_ptr<geom::Geometry> extractResult(
int opCode,
OverlayGraph* graph);
156 std::unique_ptr<geom::Geometry> createEmptyResult();
170 static constexpr
bool STRICT_MODE_DEFAULT =
false;
172 static constexpr
int INTERSECTION = 1;
173 static constexpr
int UNION = 2;
174 static constexpr
int DIFFERENCE = 3;
175 static constexpr
int SYMDIFFERENCE = 4;
183 : pm(p_geomFact->getPrecisionModel())
184 , inputGeom(geom0, geom1)
185 , geomFact(p_geomFact)
188 , isStrictMode(STRICT_MODE_DEFAULT)
190 , isAreaResultOnly(false)
191 , isOutputEdges(false)
192 , isOutputResultEdges(false)
193 , isOutputNodedEdges(false)
203 , inputGeom(geom0, geom1)
204 , geomFact(geom0->getFactory())
207 , isStrictMode(STRICT_MODE_DEFAULT)
209 , isAreaResultOnly(false)
210 , isOutputEdges(false)
211 , isOutputResultEdges(false)
212 , isOutputNodedEdges(false)
229 :
OverlayNG(geom0, geom1, geom0->getFactory()->getPrecisionModel(), p_opCode)
245 void setStrictMode(
bool p_isStrictMode) { isStrictMode = p_isStrictMode; }
246 void setAreaResultOnly(
bool p_areaResultOnly) { isAreaResultOnly = p_areaResultOnly; }
247 void setOutputEdges(
bool p_isOutputEdges) { isOutputEdges = p_isOutputEdges; }
248 void setOutputResultEdges(
bool p_isOutputResultEdges) { isOutputResultEdges = p_isOutputResultEdges; }
249 void setNoder(noding::Noder* p_noder) { noder = p_noder; }
251 void setOutputNodedEdges(
bool p_isOutputNodedEdges)
253 isOutputEdges =
true;
254 isOutputNodedEdges = p_isOutputNodedEdges;
265 std::unique_ptr<Geometry> getResult();
275 static bool isResultOfOpPoint(
const OverlayLabel* label,
int opCode);
288 static bool isResultOfOp(
int overlayOpCode, Location loc0, Location loc1);
301 static std::unique_ptr<Geometry>
302 overlay(
const Geometry* geom0,
const Geometry* geom1,
303 int opCode,
const PrecisionModel* pm);
317 static std::unique_ptr<Geometry>
318 overlay(
const Geometry* geom0,
const Geometry* geom1,
319 int opCode,
const PrecisionModel* pm, noding::Noder* noder);
332 static std::unique_ptr<Geometry>
333 overlay(
const Geometry* geom0,
const Geometry* geom1,
334 int opCode, noding::Noder* noder);
356 static std::unique_ptr<Geometry>
357 overlay(
const Geometry* geom0,
const Geometry* geom1,
int opCode);
379 static std::unique_ptr<Geometry>
380 geomunion(
const Geometry* geom,
const PrecisionModel* pm);
399 static std::unique_ptr<Geometry>
400 geomunion(
const Geometry* geom,
const PrecisionModel* pm, noding::Noder* noder);
Definition: OverlayNG.h:120
OverlayNG(const geom::Geometry *geom0, const geom::Geometry *geom1, const geom::GeometryFactory *p_geomFact, int p_opCode)
Definition: OverlayNG.h:182
Definition: OverlayGraph.h:54
OverlayNG(const geom::Geometry *geom0, const geom::Geometry *geom1, int p_opCode)
Definition: OverlayNG.h:228
Specifies the precision model of the Coordinate in a Geometry.
Definition: PrecisionModel.h:90
OverlayNG(const geom::Geometry *geom0, const geom::Geometry *geom1, const geom::PrecisionModel *p_pm, int p_opCode)
Definition: OverlayNG.h:201
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
void setOptimized(bool p_isOptimized)
Definition: OverlayNG.h:244
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:65
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
Computes all intersections between segments in a set of SegmentString.
Definition: Noder.h:46