DistanceCalculatorHaversine class

Distance calculator for points on a sphere (latitude/longitude coordinates), based on the Haversine algorithm.

Inheritance

Constructors

DistanceCalculatorHaversine(double radius)
const

Properties

hashCode int
The hash code for this object.
no setterinherited
radius double
The sphere's radius.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

distance(Point from, Point to) double?
Computes the distance between from and to positions. Returns the great-circle distance using 'haversine' formula. Point.altitude values are ignored. from and to positions must be geography-based, i.e. their latitude and longitude are both set; otherwise null 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 return null 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