pub static Geodesic: GeodesicMeasure
Expand description
Measures distance on an ellipsoidal model of the Earth using methods given by Karney (2013).
Geodesic measurements are more accurate than Haversine
, but a bit slower, because they
account for the fact that the Earth is not a perfect sphere.
Distances are computed using geodesic lines and are measured in meters.
For all the trait methods available to Geodesic
, see
GeodesicMeasure
.
ยงExample
use geo::{wkt, Geodesic, Distance};
let start = wkt!(POINT(23.319941 42.698334)); // Sofia: Longitude, Latitude
let finish = wkt!(POINT(24.742168 42.136097)); // Plovdiv: Longitude, Latitude
assert_relative_eq!(
132675.5018588206, // meters
Geodesic.distance(start, finish)
);