skillfed

py-geohex3

geohex v3.2 python implementation

py-geohex3 v1.0.0 133.9K downloads/30d#11,493 on PyPI16
Permissive license Abandoned released

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-geohex3

uv

uv add py-geohex3

poetry

poetry add py-geohex3

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Topic :: Scientific/Engineering :: GIS

Tags

geohex encoding decodinglatitude longitude to geohexspatial indexing geographicgeohex zone codelocation to hex gridgeohex python implementationgeographic coordinate hashing
gisspatial-indexinggeohashing

More GIS packages