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;
301 static std::unique_ptr<Geometry>
317 static std::unique_ptr<Geometry>
332 static std::unique_ptr<Geometry>
356 static std::unique_ptr<Geometry>
379 static std::unique_ptr<Geometry>
399 static std::unique_ptr<Geometry>
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:65
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
Specifies the precision model of the Coordinate in a Geometry.
Definition: PrecisionModel.h:88
Computes all intersections between segments in a set of SegmentString.
Definition: Noder.h:46
Definition: OverlayGraph.h:54
Definition: OverlayLabel.h:89
Definition: OverlayNG.h:120
void setOptimized(bool p_isOptimized)
Definition: OverlayNG.h:244
OverlayNG(const geom::Geometry *geom0, const geom::Geometry *geom1, const geom::GeometryFactory *p_geomFact, int p_opCode)
Definition: OverlayNG.h:182
static std::unique_ptr< Geometry > overlay(const Geometry *geom0, const Geometry *geom1, int opCode, noding::Noder *noder)
static std::unique_ptr< Geometry > geomunion(const Geometry *geom, const PrecisionModel *pm)
static std::unique_ptr< Geometry > overlay(const Geometry *geom0, const Geometry *geom1, int opCode, const PrecisionModel *pm)
std::unique_ptr< Geometry > getResult()
static std::unique_ptr< Geometry > overlay(const Geometry *geom0, const Geometry *geom1, int opCode)
OverlayNG(const geom::Geometry *geom0, const geom::Geometry *geom1, const geom::PrecisionModel *p_pm, int p_opCode)
Definition: OverlayNG.h:201
static std::unique_ptr< Geometry > overlay(const Geometry *geom0, const Geometry *geom1, int opCode, const PrecisionModel *pm, noding::Noder *noder)
static bool isResultOfOpPoint(const OverlayLabel *label, int opCode)
OverlayNG(const geom::Geometry *geom0, const geom::Geometry *geom1, int p_opCode)
Definition: OverlayNG.h:228
static bool isResultOfOp(int overlayOpCode, Location loc0, Location loc1)
static std::unique_ptr< Geometry > geomunion(const Geometry *geom, const PrecisionModel *pm, noding::Noder *noder)
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:32
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25