DistanceCalculatorHaversine class
Distance calculator for points on a sphere (latitude/longitude coordinates), based on the Haversine algorithm.
- Inheritance
-
- Object
- DistanceCalculator
- DistanceCalculatorHaversine
Constructors
- DistanceCalculatorHaversine.new(double radius)
-
const
Properties
Methods
-
distance(
Point from, Point to) → double? -
Computes the distance between
from
andto
positions. Returns the great-circle distance using 'haversine' formula. Point.altitude values are ignored.from
andto
positions must be geography-based, i.e. their latitude and longitude are both set; otherwisenull
is returned.override -
measure(
Shape shape) → double? -
Computes the length of a line or polygon by adding up distances between
consecutive Points making it up. Returns
null
if distance returnnull
for any two consecutive Points.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited