skillfed

h3

Uber's hierarchical hexagonal geospatial indexing system

h3 v4.5.0 12.1M downloads/30d#1,347 on PyPI1,029
Permissive license Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) Active released

What it is and what it does

h3 is a Python binding to Uber's H3 geospatial indexing system, a C library that converts latitude/longitude coordinates into hierarchical hexagonal grid cells. It lets you discretize geographic space into a multi-resolution hexagonal hierarchy, making it straightforward to bin locations, compute spatial neighborhoods, and perform geospatial aggregations without writing C code yourself.

The package wraps the H3 core library with a Pythonic API, offering multiple input/output formats and maintaining version alignment with the underlying C library in major and minor version numbers. It has no runtime Python dependencies, installs via pre-built wheels on modern platforms, and supports Python 3.10 through 3.14. The library is actively maintained by Uber and widely used for location-based analytics, mapping, and spatial data processing.

Use it for:

  • Aggregate location data into hexagonal bins for heatmaps or regional analytics dashboards.
  • Find neighboring geographic cells or compute distances between locations using the H3 hierarchy.
  • Discretize GPS traces or sensor readings into a consistent spatial grid for deduplication and analysis.
  • Build geofencing or location-based services that need efficient spatial indexing without database overhead.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

h3 provides Python bindings to Uber's H3 geospatial indexing library, converting geographic coordinates into hierarchical hexagonal grid cells and performing spatial operations on them.

Yes. h3 is a mature, actively maintained library with zero known vulnerabilities, permissive licensing, and broad platform support via pre-built wheels. Install friction is moderate but well-managed. Use it if you need to bin geographic coordinates into a hierarchical hexagonal grid or perform spatial operations on location data.

Install

h3 on PyPI

pip

pip install h3

uv

uv add h3

poetry

poetry add h3

Installing h3

Before you install

Medium install friction due to compiled C bindings, but well-mitigated by pre-built wheels for Python 3.10–3.14 across macOS, Linux, and Windows. Active maintenance with a recent release (76 days ago) and 1029 GitHub stars.

License in practice

Apache License 2.0 is permissive; you may use, modify, and distribute h3 freely in commercial and private projects, provided you include a copy of the license and note any changes you make.

Quickstart

pip install h3

import h3
lat, lng = 37.769377, -122.388903
cell = h3.latlng_to_cell(lat, lng, resolution=9)
print(cell)  # '89283082e73ffff'

Requires Python >=3.10; compiled C extension requires a compatible build environment or pre-built wheel for your platform.

Verify before relying

  • Whether the package supports multiple input/output API formats beyond the basic lat/lng_to_cell example shown in the description.
  • Performance characteristics (latency, throughput) for typical geospatial workloads at scale.

Package facts

License Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 76 days since the last release
Last repo commit
First released
Downloads 12,058,587/month — #1,347 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: h3-4.5.0-cp310-cp310-macosx_11_0_arm64.whl; h3-4.5.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; h3-4.5.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; h3-4.5.0-cp310-cp310-musllinux_1_2_x86_64.whl; h3-4.5.0-cp310-cp310-win_amd64.whl; h3-4.5.0-cp311-cp311-macosx_11_0_arm64.whl; h3-4.5.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; h3-4.5.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; h3-4.5.0-cp311-cp311-musllinux_1_2_x86_64.whl; h3-4.5.0-cp311-cp311-win_amd64.whl; h3-4.5.0-cp311-cp311-win_arm64.whl; h3-4.5.0-cp312-cp312-macosx_11_0_arm64.whl; h3-4.5.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; h3-4.5.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; h3-4.5.0-cp312-cp312-musllinux_1_2_x86_64.whl; h3-4.5.0-cp312-cp312-win_amd64.whl; h3-4.5.0-cp312-cp312-win_arm64.whl; h3-4.5.0-cp313-cp313-macosx_11_0_arm64.whl; h3-4.5.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; h3-4.5.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: CProgramming Language :: CythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: GIS

Tags

hexagonal geospatial indexingh3 grid cells pythongeographic coordinate to hexhierarchical spatial indexinggeospatial binning library
geospatialspatial-indexinggis

More GIS packages