19 #ifndef GEOS_OP_OVERLAY_OVERLAYOP_H
20 #define GEOS_OP_OVERLAY_OVERLAYOP_H
22 #include <geos/export.h>
24 #include <geos/algorithm/PointLocator.h>
25 #include <geos/geom/Dimension.h>
26 #include <geos/geom/Location.h>
27 #include <geos/geomgraph/EdgeList.h>
28 #include <geos/geomgraph/PlanarGraph.h>
29 #include <geos/operation/GeometryGraphOperation.h>
35 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
44 class GeometryFactory;
56 class ElevationMatrix;
70 class GEOS_DLL OverlayOp:
public GeometryGraphOperation {
99 static geom::Geometry* overlayOp(
const geom::Geometry* geom0,
100 const geom::Geometry* geom1,
116 static bool isResultOfOp(
const geomgraph::Label& label, OpCode opCode);
129 OverlayOp(
const geom::Geometry* g0,
const geom::Geometry* g1);
131 ~OverlayOp()
override;
142 geom::Geometry* getResultGeometry(OpCode overlayOpCode);
202 std::vector<geom::Polygon*>* resultPolyList;
204 std::vector<geom::LineString*>* resultLineList;
206 std::vector<geom::Point*>* resultPointList;
208 void computeOverlay(OpCode opCode);
210 void insertUniqueEdges(std::vector<geomgraph::Edge*>* edges,
const geom::Envelope* env =
nullptr);
232 void computeLabelsFromDepths();
238 void replaceCollapsedEdges();
250 void copyPoints(
int argIndex,
const geom::Envelope* env =
nullptr);
260 void computeLabelling();
269 void mergeSymLabels();
271 void updateNodeLabelling();
290 void labelIncompleteNodes();
308 void findResultAreaEdges(OpCode opCode);
314 void cancelDuplicateResultEdges();
321 std::vector<geom::Geometry*>* geomList);
328 std::vector<geom::Polygon*>* geomList);
335 std::vector<geom::LineString*>* geomList);
356 static std::unique_ptr<geom::Geometry> createEmptyResult(
365 std::vector<geom::Point*>* nResultPointList,
366 std::vector<geom::LineString*>* nResultLineList,
367 std::vector<geom::Polygon*>* nResultPolyList,
371 std::vector<geomgraph::Edge*>dupEdges;
390 bool avgzcomputed[2];
392 double getAverageZ(
int targetIndex);
395 ElevationMatrix* elevationMatrix;
399 void checkObviouslyWrongResult(OpCode opCode);
432 #endif // ndef GEOS_OP_OVERLAY_OVERLAYOP_H
static geom::Geometry * overlayOp(const geom::Geometry *geom0, const geom::Geometry *geom1, OpCode opCode)
Computes an overlay operation for the given geometry arguments.
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:55
Definition: geomgraph/Edge.h:65
Definition: EdgeList.h:57
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:24
OpCode
The spatial functions supported by this class.
Definition: OverlayOp.h:78
DimensionType
Definition: Dimension.h:63
Represents a linear polygon, which may include holes.
Definition: Polygon.h:63
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:81
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:187
Definition: geomgraph/Node.h:61
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition: Envelope.h:87
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:67
Computes the topological relationship (Location) of a single point to a Geometry.
Definition: PointLocator.h:56
Represents a directed graph which is embeddable in a planar surface.
Definition: geomgraph/PlanarGraph.h:74
Definition: LineString.h:67