22 #ifndef GEOS_ALGORITHM_DISTANCE_DISCRETEFRECHETDISTANCE_H
23 #define GEOS_ALGORITHM_DISTANCE_DISCRETEFRECHETDISTANCE_H
25 #include <geos/export.h>
26 #include <geos/algorithm/distance/PointPairDistance.h>
27 #include <geos/algorithm/distance/DistanceToPoint.h>
28 #include <geos/util/IllegalArgumentException.h>
29 #include <geos/geom/Geometry.h>
30 #include <geos/util/math.h>
31 #include <geos/geom/CoordinateFilter.h>
32 #include <geos/geom/CoordinateSequence.h>
39 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
52 namespace intervalrtree {
106 class GEOS_DLL DiscreteFrechetDistance {
109 static double distance(
const geom::Geometry& g0,
110 const geom::Geometry& g1);
112 static double distance(
const geom::Geometry& g0,
113 const geom::Geometry& g1,
double densifyFrac);
115 DiscreteFrechetDistance(
const geom::Geometry& p_g0,
116 const geom::Geometry& p_g1)
133 setDensifyFraction(
double dFrac)
135 if(dFrac > 1.0 || dFrac <= 0.0) {
137 "Fraction is not in range (0.0 - 1.0]");
147 return ptDist.getDistance();
150 const std::array<geom::Coordinate, 2>
151 getCoordinates()
const
153 return ptDist.getCoordinates();
159 PointPairDistance& getFrecheDistance(std::vector< std::vector<PointPairDistance> >& ca,
size_t i,
size_t j,
168 PointPairDistance ptDist;
174 DiscreteFrechetDistance(
const DiscreteFrechetDistance& other) =
delete;
175 DiscreteFrechetDistance& operator=(
const DiscreteFrechetDistance& rhs) =
delete;
186 #endif // GEOS_ALGORITHM_DISTANCE_DISCRETEFRECHETDISTANCE_H