Crate reverse_geocoder
source ·Expand description
A library for fast, offline reverse geocoding. The location data are from GeoNames.
§Usage
use reverse_geocoder::{ReverseGeocoder, SearchResult};
fn main() {
let geocoder = ReverseGeocoder::new();
let coords = (40.7831, -73.9712);
let search_result = geocoder.search(coords);
println!("Distance {}", search_result.distance);
println!("Record {}", search_result.record);
}
Structs§
- A parsed location.
- A reverse geocoder.
- Search result from querying a lat/long.
Functions§
- converts Earth surface co-ordinates in degrees of latitude and longitude to 3D cartesian coordinates on a unit sphere