Class 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.
Inherited Members
Namespace: NetTopologySuite.Algorithm.Distance
Assembly: NetTopologySuite.dll
Syntax
public class DiscreteFrechetDistance
Remarks
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 based 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 Additional information:
Constructors
| Edit this page View SourceDiscreteFrechetDistance(Geometry, Geometry)
Creates an instance of this class using the provided geometries.
Declaration
public DiscreteFrechetDistance(Geometry g0, Geometry g1)
Parameters
Type | Name | Description |
---|---|---|
Geometry | g0 | A geometry |
Geometry | g1 | A geometry |
Properties
| Edit this page View SourceCoordinates
Gets the pair of Coordinates at which the distance is obtained.
Declaration
public Coordinate[] Coordinates { get; }
Property Value
Type | Description |
---|---|
Coordinate[] | The pair of |
Methods
| Edit this page View SourceDistance(Geometry, Geometry)
Computes the Discrete Fréchet Distance between two Geometrys using a cartesian distance computation function.
Declaration
public static double Distance(Geometry g0, Geometry g1)
Parameters
Type | Name | Description |
---|---|---|
Geometry | g0 | The 1st geometry |
Geometry | g1 | The 2nd geometry |
Returns
Type | Description |
---|---|
double | The cartesian distance between |