Releases: srishanbhattarai/geoutils
Releases · srishanbhattarai/geoutils
0.5.1
0.5.0
0.4.1 Minor update
- Add normal derives to the Distance struct (#12)
0.4.0 release
Changes
- Changed Haversine distance API to also return
Distance
introduced in 0.3.0 - Make examples Rust 2018 compliant
- Updated the README to fix discrepancies relating to the Distance API (#10)
0.3.0 release
This release introduces the Distance
return type for the distance APIs instead of an f64 value which did not indicate the unit (it was meters).
Crucially, the API changed to the following:
extern crate geoutils;
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.meters()); <-- ".meters()" instead of simply using "distance"
v0.2.0
Breaking Changes
- The tuple fields for latitude and longitude from the location struct are no longer public. Instead, getters have been added named
latitude()
andlongitude()
let loc = Location::new(123.012, 45.68);
// Previously
let lat = loc.0;
let lon = loc.1;
// Now
let lat = loc.latitude()
let lon = loc.longitude()
Changes
- Added haversine distance
- Improved documentation, examples and README.
v0.1.0
Features
distance_to
using Vincenty's inverse formulais_in_circle
for radial bounds checkcenter
to get geo-center of a vector of coordinates