h3-pg

Installation
SKILL.md

h3-pg PostgreSQL Extension

Extension Architecture

Two extensions:

  • CREATE EXTENSION h3 — Core H3 bindings (indexing, traversal, hierarchy, inspection, <-> operator). No PostGIS dependency.
  • CREATE EXTENSION h3_postgis — PostGIS integration (geometry/geography casts, @ operator, polygon fill, raster helpers). Requires postgis and optionally postgis_raster.

Postgres-Specific H3 Features

These exist only in h3-pg, not other H3 language bindings.

Direct casts (h3_postgis):

  • h3index::geometry → cell centroid as POINT, SRID 4326
  • h3index::geography → cell centroid as POINT, SRID 4326

Operators:

  • a <-> b — grid distance in cells between two h3index values (h3)
  • geom @ resolution — index geometry/geography at resolution (h3_postgis)
Installs
1
First Seen
Mar 22, 2026
h3-pg from smithery.ai