Class AbstractDistanceCalculator
- java.lang.Object
-
- org.locationtech.spatial4j.distance.AbstractDistanceCalculator
-
- All Implemented Interfaces:
DistanceCalculator
- Direct Known Subclasses:
CartesianDistCalc
,GeodesicSphereDistCalc
public abstract class AbstractDistanceCalculator extends Object implements DistanceCalculator
-
-
Constructor Summary
Constructors Constructor Description AbstractDistanceCalculator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
distance(Point from, Point to)
The distance betweenfrom
andto
.String
toString()
boolean
within(Point from, double toX, double toY, double distance)
Returns true if the distance between from and to is <= distance.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.locationtech.spatial4j.distance.DistanceCalculator
area, area, calcBoxByDistFromPt, calcBoxByDistFromPt_yHorizAxisDEG, distance, pointOnBearing
-
-
-
-
Method Detail
-
distance
public double distance(Point from, Point to)
Description copied from interface:DistanceCalculator
The distance betweenfrom
andto
.- Specified by:
distance
in interfaceDistanceCalculator
-
within
public boolean within(Point from, double toX, double toY, double distance)
Description copied from interface:DistanceCalculator
Returns true if the distance between from and to is <= distance.- Specified by:
within
in interfaceDistanceCalculator
-
-