| Crates.io | geocoder_nlp |
| lib.rs | geocoder_nlp |
| version | 0.2.1 |
| created_at | 2025-12-10 05:20:58.714204+00 |
| updated_at | 2025-12-22 11:52:25.975374+00 |
| description | Rust bindings for geocoder-nlp |
| homepage | |
| repository | https://github.com/catacombing/charon |
| max_upload_size | |
| id | 1977516 |
| size | 39,112,892 |
Geocoding is the process of taking a text-based description of a location, such as an address or the name of a place, and returning geographic coordinates.
This crate statically compiles geocoder-nlp, which is an offline-capable geocoder using postal for address normalization.
While geocoder-nlp and libpostal are compiled statically, it will still link dynamically to kyotocabinet, sqlite3, and marisa. All of these are required runtime dependencies.
Additionally boost is required as a compile-time dependency.
use geocoder_nlp::Geocoder;
let mut geocoder = Geocoder::new("/tmp/postal", "/tmp/postal", "/tmp/geocoder").unwrap();
// Get all results matching `Rúa` in our selected dataset.
let mut results = geocoder.search("Rúa", None).unwrap();
// Output results in descending relevance.
while let Some(result) = results.next() {
println!("Title: {}", result.title());
println!("Latitude: {}, Longitude: {}", result.latitude(), result.longitude());
println!("Address: {} {}", result.postal_code(), result.address());
println!();
}