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§

Record
A parsed location.
ReverseGeocoder
A reverse geocoder.
SearchResult
Search result from querying a lat/long.

Functions§

degrees_lat_lng_to_unit_sphere
converts Earth surface co-ordinates in degrees of latitude and longitude to 3D cartesian coordinates on a unit sphere