19#ifndef GEOS_OP_OVERLAY_OVERLAYOP_H
20#define GEOS_OP_OVERLAY_OVERLAYOP_H
22#include <geos/export.h>
24#include <geos/operation/GeometryGraphOperation.h>
25#include <geos/geomgraph/EdgeList.h>
26#include <geos/algorithm/PointLocator.h>
27#include <geos/geomgraph/PlanarGraph.h>
33#pragma warning(disable: 4251)
54 class ElevationMatrix;
68class GEOS_DLL
OverlayOp:
public GeometryGraphOperation {
196 std::vector<geom::Polygon*> *resultPolyList;
198 std::vector<geom::LineString*> *resultLineList;
200 std::vector<geom::Point*> *resultPointList;
202 void computeOverlay(
OpCode opCode);
204 void insertUniqueEdges(std::vector<geomgraph::Edge*> *edges,
const geom::Envelope *env=0);
226 void computeLabelsFromDepths();
232 void replaceCollapsedEdges();
254 void computeLabelling();
263 void mergeSymLabels();
265 void updateNodeLabelling();
284 void labelIncompleteNodes();
302 void findResultAreaEdges(
OpCode opCode);
308 void cancelDuplicateResultEdges();
315 std::vector<geom::Geometry*> *geomList);
322 std::vector<geom::Polygon*> *geomList);
329 std::vector<geom::LineString*> *geomList);
336 std::vector<geom::Point*> *nResultPointList,
337 std::vector<geom::LineString*> *nResultLineList,
338 std::vector<geom::Polygon*> *nResultPolyList);
341 std::vector<geomgraph::Edge *>dupEdges;
360 bool avgzcomputed[2];
362 double getAverageZ(
int targetIndex);
365 ElevationMatrix *elevationMatrix;
369 void checkObviouslyWrongResult(
OpCode opCode);
Computes the topological relationship (Location) of a single point to a Geometry.
Definition PointLocator.h:58
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:60
An Envelope defines a rectangulare region of the 2D coordinate plane.
Definition Envelope.h:53
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition GeometryFactory.h:67
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:167
Definition LineString.h:70
Represents a linear polygon, which may include holes.
Definition Polygon.h:67
Definition geomgraph/Edge.h:66
A Label indicates the topological relationship of a component of a topology graph to a given Geometry...
Definition Label.h:57
Definition geomgraph/Node.h:62
Represents a directed graph which is embeddable in a planar surface.
Definition geomgraph/PlanarGraph.h:75
static geom::Geometry * overlayOp(const geom::Geometry *geom0, const geom::Geometry *geom1, OpCode opCode)
void insertUniqueEdge(geomgraph::Edge *e)
Insert an edge from one of the noded input graphs.
OpCode
The spatial functions supported by this class.
Definition OverlayOp.h:77
@ opSYMDIFFERENCE
The code for the Symmetric Difference overlay operation.
Definition OverlayOp.h:85
@ opUNION
The code for the Union overlay operation.
Definition OverlayOp.h:81
@ opINTERSECTION
The code for the Intersection overlay operation.
Definition OverlayOp.h:79
@ opDIFFERENCE
The code for the Difference overlay operation.
Definition OverlayOp.h:83
bool isCoveredByLA(const geom::Coordinate &coord)
This method is used to decide if a point node should be included in the result or not.
geom::Geometry * getResultGeometry(OpCode overlayOpCode)
static bool isResultOfOp(int loc0, int loc1, OpCode opCode)
This method will handle arguments of Location.NULL correctly.
OverlayOp(const geom::Geometry *g0, const geom::Geometry *g1)
Construct an OverlayOp with the given Geometry args.
bool isCoveredByA(const geom::Coordinate &coord)
This method is used to decide if an L edge should be included in the result or not.
geomgraph::PlanarGraph & getGraph()
Definition OverlayOp.h:148
static bool isResultOfOp(const geomgraph::Label &label, OpCode opCode)
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
Contains classes that implement topology graphs.
Definition IndexedNestedRingTester.h:34
Contains classes that perform a topological overlay to compute boolean spatial functions.
Definition BufferBuilder.h:62
Provides classes for implementing operations on geometries.
Definition IndexedNestedRingTester.h:40
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25