public class FrechetSimilarityMeasure extends Object implements SimilarityMeasure
Geometry
s using the Fréchet distance metric.
The measure is normalized to lie in the range [0, 1].
Higher measures indicate a great degree of similarity.
The measure is computed by computing the Fréchet distance
between the input geometries, and then normalizing
this by dividing it by the diagonal distance across
the envelope of the combined geometries.
Note: the input should be normalized, especially when
measuring MultiPoint
geometries because for the
Fréchet distance the order of Coordinate
s is
important.Constructor and Description |
---|
FrechetSimilarityMeasure()
Creates an instance of this class.
|
Modifier and Type | Method and Description |
---|---|
double |
measure(Geometry g1,
Geometry g2)
Computes the similarity measure between two geometries
|
public FrechetSimilarityMeasure()
public double measure(Geometry g1, Geometry g2)
SimilarityMeasure
measure
in interface SimilarityMeasure
g1
- a geometryg2
- a geometryCopyright © 2024. All rights reserved.