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)

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.0.tar.gz (2.1 MB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for reverse_geocoder-1.0.tar.gz
Algorithm Hash digest
SHA256 222e5a15c9675e65dd11b1dca36af5caa71fab555c1c459d85175d3ececf1d5c
MD5 8a6355be56f5e33b99525004938b1817
BLAKE2b-256 0a7634ff7ea21e44b56529ce2d8346cf03dbc8dff357242ea6bf89f7a025028f

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