Class DiscreteFrechetDistance
java.lang.Object
org.locationtech.jts.algorithm.distance.DiscreteFrechetDistance
The Fréchet distance is a measure of similarity between curves. Thus, it can
be used like the Hausdorff distance.
An analogy for the Fréchet distance taken from
Computing Discrete Fréchet Distance
A man is walking a dog on a leash: the man can move on one curve, the dog on the other; both may vary their speed, but backtracking is not allowed.Its metric is better than the Hausdorff distance because it takes the directions of the curves into account. It is possible that two curves have a small Hausdorff but a large Fréchet distance. This implementation is base on the following optimized Fréchet distance algorithm:
Thomas Devogele, Maxence Esnault, Laurent Etienne. Distance discrète de Fréchet optimisée. Spatial Analysis and Geomatics (SAGEO), Nov 2016, Nice, France. hal-02110055Several matrix storage implementations are provided
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDiscreteFrechetDistance(Geometry g0, Geometry g1) Creates an instance of this class using the provided geometries. -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleComputes the Discrete Fréchet Distance between twoGeometrys using aCartesiandistance computation function.Gets the pair ofCoordinates at which the distance is obtained.
-
Constructor Details
-
DiscreteFrechetDistance
-
-
Method Details
-
distance
-
getCoordinates
Gets the pair ofCoordinates at which the distance is obtained.- Returns:
- the pair of Coordinates at which the distance is obtained
-