Mapzen Geohash
A geohash is a convenient method for encoding geographic coordinates, where each character in the geohash adds additional precision. This makes geohashes well suited for indexing mechanisms, grouping geographically located entities, and compactly encoding coordinates based on the level of detail required.
More information about Geohashes:
- http://www.movable-type.co.uk/scripts/geohash.html
- http://en.wikipedia.org/wiki/Geohash
- http://geohash.org/
This Python package contains simple tools for encoding and decoding geohashes.
Installation
Installation using pip:
pip install mzgeohash
Alternatively, download from PyPi or clone this repository, and install using setup.py:
python ./setup.py install
Example usage
>>> import mzgeohash
>>> mzgeohash.decode('xn76urwe1g9y')
(139.76608408614993, 35.681382017210126)
>>> mzgeohash.encode((139.76608408614993, 35.681382017210126))
'xn76urwe1g9y'
>>> mzgeohash.neighbors('xn76urwe1g9y')
{'c': 'xn76urwe1g9y',
'e': 'xn76urwe1gdn',
'n': 'xn76urwe1g9z',
'ne': 'xn76urwe1gdp',
'nw': 'xn76urwe1g9x',
's': 'xn76urwe1g9v',
'se': 'xn76urwe1gdj',
'sw': 'xn76urwe1g9t',
'w': 'xn76urwe1g9w'}
Contributing
Please open a Github issue with as much of the following information as you're able to specify, or contact us for assistance.
Contact
Transitland is sponsored by Mapzen. Contact us with your questions, comments, or suggests: hello@mapzen.com.
Release files for mzgeohash 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mzgeohash-1.1.0.tar.gz | 5.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mzgeohash-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.2 kB
Release files / mzgeohash-1.1.0.tar.gz
| Download URL | mzgeohash-1.1.0.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9abf68ebd721ca8e97cb50bb8000abd24096d255c9a5acff91e9dff507f1c3c0
|
|
BLAKE2b-256 checksum How to use checksums |
6e18c1876381c452618835cb026aa32beb16d46a54e8abfd8b8f9e32fd4094b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / mzgeohash-1.1.0-py3-none-any.whl
| Download URL | mzgeohash-1.1.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18fe4abd1b14ce1fe3b0a612e0eec5d8b8266ce86a9b4235f6e9789e2e964bca
|
|
BLAKE2b-256 checksum How to use checksums |
e55ee7981ecc5db3c4d64da665d11db56504263f26cdaf812a7d3a8e92bb1d89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|