1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Fast reverse geocoding with enriched location data.
//!
//! Converts `(latitude, longitude)` into a [`Place`] with 18 fields including
//! city, region, country, postal code, timezone, currency, EU/DST status.
//!
//! ```no_run
//! if let Some(place) = genom::lookup(40.7128, -74.0060) {
//! println!("{}, {}", place.city, place.country_name);
//! }
//! ```
//!
//! # How it works
//!
//! - Database is built once at compile time from GeoNames + Natural Earth and
//! embedded as a compact binary blob (`geo.bin`).
//! - On first call, the blob is parsed lazily into zero-copy `&'static` slices
//! plus two `FxHashMap` indexes (grid → city offset, country → postal section).
//! - Lookup expands a grid-cell ring until the nearest city is found, refines
//! with the nearest postal entry for that country, then enriches with
//! country/currency/continent/timezone metadata.
//!
//! See [`Geocoder`], [`Place`], [`Location`], [`enrichment`].
pub use Geocoder;
pub use ;
/// Reverse-geocode `(latitude, longitude)` using the global [`Geocoder`].
///
/// Returns `None` for coordinates with no nearby city (e.g. open ocean).