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 doubledistance(Point from, Point to)The distance betweenfromandto.StringtoString()booleanwithin(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:DistanceCalculatorThe distance betweenfromandto.- Specified by:
distancein interfaceDistanceCalculator
-
within
public boolean within(Point from, double toX, double toY, double distance)
Description copied from interface:DistanceCalculatorReturns true if the distance between from and to is <= distance.- Specified by:
withinin interfaceDistanceCalculator
-
-