Skip to content

Instantly share code, notes, and snippets.

@zfz
Created April 3, 2015 04:18
Show Gist options
  • Save zfz/74d9a2e31abae2776905 to your computer and use it in GitHub Desktop.
Save zfz/74d9a2e31abae2776905 to your computer and use it in GitHub Desktop.
A Python library for offline reverse geocoding, https://github.com/thampiman/reverse-geocoder
In [1]: import reverse_geocoder as rg
In [2]: coordinates = (39.99, 116.48),
In [3]: results = rg.search(coordinates)
Loading formatted geocoded file...
In [4]: print results
[{'name': 'Wangjing', 'cc': 'CN', 'lon': '116.47284', 'admin1': 'Beijing', 'admin2': '', 'lat': '39.9933'}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment