20 #ifndef GEOS_OP_OVERLAY_SNAP_GEOMETRYSNAPPER_H
21 #define GEOS_OP_OVERLAY_SNAP_GEOMETRYSNAPPER_H
23 #include <geos/geom/Coordinate.h>
33 class CoordinateSequence;
58 class GEOS_DLL GeometrySnapper {
62 typedef std::unique_ptr<geom::Geometry> GeomPtr;
73 static void snap(
const geom::Geometry& g0,
74 const geom::Geometry& g1,
75 double snapTolerance, geom::GeomPtrPair& ret);
77 static GeomPtr snapToSelf(
const geom::Geometry& g0,
78 double snapTolerance,
bool cleanResult);
85 GeometrySnapper(
const geom::Geometry& g)
100 std::unique_ptr<geom::Geometry> snapTo(
const geom::Geometry& g,
101 double snapTolerance);
112 std::unique_ptr<geom::Geometry> snapToSelf(
double snapTolerance,
122 static double computeOverlaySnapTolerance(
const geom::Geometry& g);
124 static double computeSizeBasedSnapTolerance(
const geom::Geometry& g);
129 static double computeOverlaySnapTolerance(
const geom::Geometry& g1,
130 const geom::Geometry& g2);
138 static const double snapPrecisionFactor;
140 const geom::Geometry& srcGeom;
143 std::unique_ptr<geom::Coordinate::ConstVect> extractTargetCoordinates(
144 const geom::Geometry& g);
147 GeometrySnapper(
const GeometrySnapper& other) =
delete;
148 GeometrySnapper& operator=(
const GeometrySnapper& rhs) =
delete;
157 #endif // GEOS_OP_OVERLAY_SNAP_GEOMETRYSNAPPER_H