Expand description

A library for fast, offline reverse geocoding. The location data are from GeoNames.


use reverse_geocoder::{Locations, ReverseGeocoder, SearchResult};

fn main() {
    let loc = Locations::from_memory();
    let geocoder = ReverseGeocoder::new(&loc);
    let coords = (40.7831, -73.9712);
    let search_result = geocoder.search(coords).unwrap();
    println!("Distance {}", search_result.distance);
    println!("Record {}", search_result.record);


A set of location records.

A parsed location.

A reverse geocoder.

Search result from querying a lat/long.