geohash2
(Geohash fixed for python3) Module to decode/encode Geohashes to/from latitude and longitude. See http://en.wikipedia.org/wiki/Geohash
What it is and what it does
geohash2 is a Python module for converting between geographic coordinates (latitude/longitude) and geohash strings. Geohashes are compact alphanumeric representations of locations that encode spatial proximity—nearby coordinates produce similar hashes. The module provides two main functions: encode() converts coordinates to a geohash string with configurable precision (number of characters), and decode() reverses the process. It also offers decode_exactly() which returns the decoded coordinates along with error margins, quantifying the precision loss inherent in the geohash encoding.
The package has no runtime dependencies and is straightforward to use for location-based applications that need compact coordinate representations. However, it has been abandoned since July 2017 with no updates, and the build is source-only (high install friction), making it risky for new projects unless you can verify it works on your target Python version.
Use it for:
- Store geographic locations compactly in databases or caches using geohash strings instead of separate lat/lon columns.
- Perform spatial proximity queries by comparing geohash prefixes to find nearby locations without distance calculations.
- Implement geotagging systems where coordinates are encoded into short, human-readable location identifiers.
- Build location-based caching or indexing where geohash precision controls the granularity of spatial buckets.
- Validate coordinate precision and understand error margins when converting between exact coordinates and geohash representations.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Encodes latitude/longitude coordinates to geohashes and decodes geohashes back to coordinates with optional error margins.
No. The package is abandoned (last release July 2017, no maintenance since), has high install friction (source-only distribution), and Python version support is unspecified. AGPL licensing adds legal complexity for commercial or networked deployments. For new projects, prefer an actively maintained geohash library or implement geohashing directly using a well-supported dependency.
Install
geohash2 on PyPI
pip
pip install geohash2uv
uv add geohash2poetry
poetry add geohash2Installing geohash2
Before you install
High install friction due to source-only distribution (tar.gz). Package is abandoned—last release July 2017, no commits since, though the repository remains publicly available.
License in practice
Licensed under GNU Affero General Public License v3 or later. AGPL requires that any modifications or derivative works be released under the same license, and networked use may trigger copyleft obligations depending on deployment context.
Quickstart
pip install geohash2
import geohash2
geohash = geohash2.encode(42.6, -5.6, precision=5)
print(geohash) # ezs42
lat, lon = geohash2.decode('ezs42')
print(lat, lon)
Package requires compilation or has no pre-built wheels; Python version support is unspecified and may be limited to older versions.
Verify before relying
- Whether the package actually builds and runs on modern Python versions (3.10+) given the 2017 last release date.
- Whether high install friction is due to missing wheels or actual build dependencies.
- Current maintenance status and whether the repository accepts pull requests or has an active maintainer.
Package facts
| License | GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. (agpl) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 3,326 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 990,172/month — #4,564 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: geohash2-1.1.tar.gz
Keywords: Geohash, GIS, latitude, longitude, encode, decode, Galileo, GPS, WGS84, coordinates, geotagging
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
geolibEncodes and decodes geographic coordinates as…
permissive · top 15,000 on PyPI
pygeohashEncodes latitude/longitude coordinates to…
permissive · top 5,000 on PyPI
py-geohex3Converts between geographic coordinates…
permissive · top 15,000 on PyPI
global-land-maskDetermines whether geographic coordinates…
permissive · top 15,000 on PyPI
python-geohashpython-geohash encodes and decodes geographic…
unclear · top 15,000 on PyPI
pypolylineEncodes and decodes Google Polyline format…
unclear · top 15,000 on PyPI
convertbngConverts decimal WGS84 longitude/latitude…
unclear · top 15,000 on PyPI
utmConverts between latitude/longitude coordinates…
permissive · top 5,000 on PyPI
mgrsConverts between MGRS (Military Grid Reference…
permissive · top 15,000 on PyPI
reverse-geocodeReverse Geocode converts latitude/longitude…
copyleft · top 15,000 on PyPI