Skip to main content

Fast, offline reverse geocoder

Project description

Reverse Geocoder takes a latitude / longitude coordinate and returns the nearest town/city. This library improves on an existing library called reverse_geocode developed by Richard Penman in the following ways: 1. Besides city and country, this library also returns the administrative 1 & 2 regions, latitude and longitude 2. The performance is much faster since a parallelized K-D tree is implemeneted (See https://github.com/thampiman/reverse-geocoder for performance comparison)

Supports Python 2 and 3.

Example usage:
>>> import reverse_geocoder as rg
>>> coordinates = (51.5214588,-0.1729636),(13.9280531,100.3735803)
>>> rg.search(coordinates)
[{'admin1': 'England',
      'admin2': 'Greater London',
      'cc': 'GB',
      'lat': '51.51116',
      'lon': '-0.18426',
      'name': 'Bayswater'},
     {'admin1': 'Nonthaburi',
      'admin2': '',
      'cc': 'TH',
      'lat': '13.91783',
      'lon': '100.42403',
      'name': 'Bang Bua Thong'}]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reverse_geocoder-1.2.tar.gz (2.2 MB view details)

Uploaded Source

File details

Details for the file reverse_geocoder-1.2.tar.gz.

File metadata

File hashes

Hashes for reverse_geocoder-1.2.tar.gz
Algorithm Hash digest
SHA256 ece9fc8e73f298154e4aeb7e1021690a0eee8ceed4ce3293552f46380e0cae6f
MD5 57bd4a010eec8c2b3ab5368164710011
BLAKE2b-256 d508edd5df11b8963c7d35e6fc5444b54655881d45b99d91a02b3a688a57a3e2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page