interface DistanceCalculator
Fast distance calculator for WGS84 (Earth as spheroid). Should be initialized by latitude and used in some not far around area. Expected error is 0.04%.
Return
Distance in meters.
distance |
abstract fun distance(from: Point, to: Point): Double |
squareDistance |
This function is faster than distance and used to compare distances. abstract fun squareDistance(from: Point, to: Point): Double |
distanceOnSphere |
This method provides better result precision with minimal error level, than distance. fun distanceOnSphere(from: Point, to: Point): Double |