Skip to content

Latest commit

 

History

History
56 lines (33 loc) · 1.38 KB

README.rst

File metadata and controls

56 lines (33 loc) · 1.38 KB

Geohash

Documentation Status

Encode/decode Geohashes http://geohash.org

Wraps Derek Smith libgeohash. See https://github.com/simplegeo/libgeohash for implementation.

Features

  • Encode
from geohash import geohash_encode
print(geohash_encode(35.689487, 139.691706))
# xn774c <- hash for Tokyo, Japan
  • Decode
from geohash import geohash_decode
paris = geohash_decode('u09tvw')
print(paris.latitude, paris.longitude)
# 48.856614, 2.352222

Credits

Geohash implementation is by Derek Smith's libgeohash. See https://github.com/simplegeo/libgeohash

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.