Geoutils is a evolving crate to provide several geological computations and utilities. Most computations are based off methods on the Location struct.
Find the full API reference at docs.rs.
use geoutils::Location;
let berlin = Location::new(52.518611, 13.408056); let moscow = Location::new(55.751667, 37.617778); let distance = berlin.distance_to(&moscow).unwrap();
println!("Distance = {}", distance); ```
use geoutils::Location;
let berlin = Location::new(52.518611, 13.408056); let moscow = Location::new(55.751667, 37.617778); let distance = berlin.haversinedistanceto(&moscow);
println!("Distance = {}", distance); ```
use geoutils::Location;
let berlin = Location::new(52.518611, 13.408056); let moscow = Location::new(55.751667, 37.617778); let center = Location::center(vec![&berlin, &moscow]);
println!("Center {}, {}", center.latitude(), center.longitude()); ```
use geoutils::Location;
let berlin = Location::new(52.518611, 13.408056); let moscow = Location::new(55.751667, 37.617778); let isinradius = berlin.isincircle(&moscow, 2000);
println!("Is Berlin in 2000m of Moscow? {}", isinradius); ```
Apache-2.0