Skip to main content

Reverse geocode the given latitude / longitude

Project description

Reverse Geocode

Reverse Geocode takes a latitude / longitude coordinate and returns the country and city. Example usage:

>>> import reverse_geocode
>>> coordinates = (-37.81, 144.96), (31.76, 35.21)
>>> reverse_geocode.search(coordinates)
[{'city': 'Melbourne', 'country_code': 'AU', 'country': 'Australia'},
 {'city': 'Jerusalem', 'country_code': 'IL', 'country': 'Israel'}]

The module has a set of known geocoded locations and uses a k-d tree to efficiently find the nearest neighbour. This can be useful when you need to reverse geocode a large number of coordinates so a web API is not practical.

As this is a point based and not a polygon based lookup it will only give a rough idea of the location/city

Install

Supports python 2 & 3:

pip install reverse-geocode
pip3 install reverse-geocode

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_geocode-1.6.tar.gz (2.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reverse_geocode-1.6-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

File details

Details for the file reverse_geocode-1.6.tar.gz.

File metadata

  • Download URL: reverse_geocode-1.6.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for reverse_geocode-1.6.tar.gz
Algorithm Hash digest
SHA256 49efed11af770e10560a12ab3b03f36917901e662e0d904e5b0043a74e085180
MD5 247bd5fd62fa1935f94b69aeacb51268
BLAKE2b-256 5f880e31ad8957ae32047c2f4b3797116b61a1f8770635da453887c4aa9b6938

See more details on using hashes here.

File details

Details for the file reverse_geocode-1.6-py3-none-any.whl.

File metadata

  • Download URL: reverse_geocode-1.6-py3-none-any.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for reverse_geocode-1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 97971187c1e931023b7aeedd6751610e573445bf3684722c3cfd6be220f47ddd
MD5 3cecf27d4322a67a15814448634af1e8
BLAKE2b-256 8631115841f52d0130406dc5cbea542c90da723b6961add12bcabe52fa5d14d8

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