public class CoordinateDistance extends java.lang.Object implements java.lang.Comparable<CoordinateDistance>
| Constructor and Description |
|---|
CoordinateDistance(org.locationtech.jts.geom.Point coordinateA,
org.locationtech.jts.geom.Point coordinateB)
Calculates the distance from the first to the second coordinate using
GeoUtils.calcHaversine(double, double, double, double) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(CoordinateDistance that)
Compares two coordinate distances on the length of the distance alone, thus having a natural
ordering that is inconsistent with equals
|
boolean |
equals(java.lang.Object o) |
org.locationtech.jts.geom.Point |
getCoordinateA() |
org.locationtech.jts.geom.Point |
getCoordinateB() |
tech.units.indriya.ComparableQuantity<javax.measure.quantity.Length> |
getDistance() |
int |
hashCode() |
java.lang.String |
toString() |
public CoordinateDistance(org.locationtech.jts.geom.Point coordinateA,
org.locationtech.jts.geom.Point coordinateB)
GeoUtils.calcHaversine(double, double, double, double)coordinateA - The first coordinatecoordinateB - The second coordinatepublic org.locationtech.jts.geom.Point getCoordinateA()
public org.locationtech.jts.geom.Point getCoordinateB()
public tech.units.indriya.ComparableQuantity<javax.measure.quantity.Length> getDistance()
public int compareTo(CoordinateDistance that)
compareTo in interface java.lang.Comparable<CoordinateDistance>that - the distance to comparepublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object