| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
package org.locationtech.jts.algorithm.match; |
| 14 |
|
| 15 |
import org.locationtech.jts.geom.Geometry; |
| 16 |
|
| 17 |
/** |
| 18 |
* An interface for classes which measures the degree of similarity between two {@link Geometry}s. |
| 19 |
* The computed measure lies in the range [0, 1]. |
| 20 |
* Higher measures indicate a great degree of similarity. |
| 21 |
* A measure of 1.0 indicates that the input geometries are identical |
| 22 |
* A measure of 0.0 indicates that the geometries |
| 23 |
* have essentially no similarity. |
| 24 |
* The precise definition of "identical" and "no similarity" may depend on the |
| 25 |
* exact algorithm being used. |
| 26 |
* |
| 27 |
* @author mbdavis |
| 28 |
* |
| 29 |
*/ |
| 30 |
public interface SimilarityMeasure |
| 31 |
{ |
| 32 |
/** |
| 33 |
* Computes the similarity measure between two geometries |
| 34 |
* @param g1 a geometry |
| 35 |
* @param g2 a geometry |
| 36 |
* @return the value of the similarity measure, in [0.0, 1.0] |
| 37 |
*/ |
| 38 |
double measure(Geometry g1, Geometry g2); |
| 39 |
} |
| 40 |
|