py-geohex3
geohex v3.2 python implementation
What it is and what it does
py-geohex3 is a Python implementation of the Geohex v3.2 spatial indexing system, which encodes geographic locations into compact alphanumeric codes and decodes those codes back to coordinates. It provides two main functions: converting a latitude/longitude pair and precision level into a zone code, and converting a zone code back into its approximate center coordinates. The package has no external dependencies and installs as a pure Python wheel.
Geohex is used in GIS applications where you need to index, query, or group locations by geographic proximity. The zone code acts as a hierarchical spatial hash—different precision levels produce codes of different granularity, allowing you to cluster nearby points or perform efficient spatial lookups. The package is marked stable but is no longer maintained, and its Python version support is dated.
Use it for:
- Index geographic locations in a database by zone code for efficient spatial range queries
- Group nearby GPS coordinates into the same hex zone for clustering or aggregation tasks
- Convert lat/lon pairs to compact, shareable location identifiers for mapping applications
- Implement spatial partitioning for load-balancing or data distribution across geographic regions
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts between geographic coordinates (latitude/longitude) and Geohex v3.2 zone codes, a hierarchical spatial indexing system for mapping and location-based applications.
Yes, if you specifically need Geohex v3.2 encoding/decoding and are comfortable with an unmaintained package. The library is simple, dependency-free, and has no known vulnerabilities. Test compatibility with your Python version first, as classifiers only list through Python 3.6. If you need active maintenance or support for newer Python versions, consider whether an alternative spatial indexing library might be a better fit.
Install
py-geohex3 on PyPI
pip
pip install py-geohex3uv
uv add py-geohex3poetry
poetry add py-geohex3Installing py-geohex3
Before you install
Installation is frictionless with no runtime dependencies. However, the package is abandoned—last release was 2017-04-17, with no commits since 2021-04-29. It targets Python 2.7 and early Python 3 versions, which may cause compatibility issues with modern Python environments.
License in practice
Licensed under MIT (permissive), so you may use, modify, and distribute the package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install py-geohex3
# Encode: latitude, longitude, precision → zone code
zone = get_zone_by_location(35.65858, 139.745433, 11)
print(zone.code) # 'XM48854457273'
# Decode: zone code → latitude, longitude
zone = get_zone_by_code('XM48854457273')
print(zone.lat, zone.lon) # (35.658618718910624, 139.74540917994662)
Package classifiers indicate support only through Python 3.6; compatibility with Python 3.7+ is unverified.
Verify before relying
- Whether the package works reliably on Python 3.7+ despite classifiers listing only through 3.6
- Whether Geohex v3.2 is the current standard or if a newer version exists that this package does not implement
- Real-world compatibility reports from users running this on modern Python versions
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 3,406 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 133,901/month — #11,493 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: py_geohex3-1.0.0-py3-none-any.whl
Keywords: gis, geohex
Tags
More GIS packages
Shapely provides Python tools for creating,…
permissive · top 1,000 on PyPI
pyprojpyproj provides a Python interface to PROJ,…
permissive · top 1,000 on PyPI
geopandasGeoPandas extends pandas DataFrames to handle…
permissive · top 1,000 on PyPI
geopygeopy is a Python client for geocoding and…
permissive · top 5,000 on PyPI
pyogrioPyogrio provides fast, bulk-oriented read and…
permissive · top 5,000 on PyPI
h3h3 provides Python bindings to Uber's H3…
permissive · top 5,000 on PyPI
pygeohashEncodes latitude/longitude coordinates to…
permissive · top 5,000 on PyPI
walkscore-apiProvides Python bindings to query the WalkScore…
permissive · top 15,000 on PyPI
geolibEncodes and decodes geographic coordinates as…
permissive · top 15,000 on PyPI
geohash2Encodes latitude/longitude coordinates to…
agpl · top 5,000 on PyPI
placekeyConverts between Placekeys (location…
permissive · top 15,000 on PyPI
utmConverts between latitude/longitude coordinates…
permissive · top 5,000 on PyPI
s2spheres2sphere provides Python bindings to work with…
permissive · top 15,000 on PyPI
rtreeRtree wraps libspatialindex to provide spatial…
permissive · top 5,000 on PyPI
python-geohashpython-geohash encodes and decodes geographic…
unclear · top 15,000 on PyPI