19 #ifndef GEOS_OP_OVERLAY_SNAP_SNAPOVERLAYOP_H
20 #define GEOS_OP_OVERLAY_SNAP_SNAPOVERLAYOP_H
22 #include <geos/operation/overlay/OverlayOp.h>
23 #include <geos/precision/CommonBitsRemover.h>
29 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
56 class GEOS_DLL SnapOverlayOp {
60 static std::unique_ptr<geom::Geometry>
61 overlayOp(
const geom::Geometry& g0,
const geom::Geometry& g1,
64 SnapOverlayOp op(g0, g1);
65 return op.getResultGeometry(opCode);
68 static std::unique_ptr<geom::Geometry>
69 intersection(
const geom::Geometry& g0,
const geom::Geometry& g1)
74 static std::unique_ptr<geom::Geometry>
75 Union(
const geom::Geometry& g0,
const geom::Geometry& g1)
80 static std::unique_ptr<geom::Geometry>
81 difference(
const geom::Geometry& g0,
const geom::Geometry& g1)
86 static std::unique_ptr<geom::Geometry>
87 symDifference(
const geom::Geometry& g0,
const geom::Geometry& g1)
92 SnapOverlayOp(
const geom::Geometry& g1,
const geom::Geometry& g2)
97 computeSnapTolerance();
101 typedef std::unique_ptr<geom::Geometry> GeomPtr;
107 void computeSnapTolerance();
109 void snap(geom::GeomPtrPair& ret);
111 void removeCommonBits(
const geom::Geometry& geom0,
112 const geom::Geometry& geom1,
113 geom::GeomPtrPair& ret);
116 void prepareResult(geom::Geometry& geom);
119 const geom::Geometry& geom0;
120 const geom::Geometry& geom1;
122 double snapTolerance;
124 std::unique_ptr<precision::CommonBitsRemover> cbr;
127 SnapOverlayOp(
const SnapOverlayOp& other) =
delete;
128 SnapOverlayOp& operator=(
const SnapOverlayOp& rhs) =
delete;
140 #endif // ndef GEOS_OP_OVERLAY_SNAP_SNAPOVERLAYOP_H