Home

Awesome

country-geocoder

NOTE: Deprecated / unmaintained. Use https://github.com/westnordost/country-boundaries-rust/ instead.

This crate takes a WGS84 coordinate and determines the two-letter ISO country code where it exists. It also determines if that country drives on the left or right. It does this by offline geocoding, using a bundled file.

data.geojson is produced by generate_data.py. Thanks to http://geojson.xyz for preprocessing public domain Natural Earth data of country boundaries, and to Tobias Zwick for countrymetadata and for inspiring this approach.