H3 local IJ for a cell (cellToLocalIj)
The local IJ coordinates of a cell as seen from an origin cell: two whole numbers on the grid unfolds around that origin.
From the anchor the cell sits at (309, 2,470).
- J
- Anchor
- Cell
Provenance
- Computed by
- indexing.h3.cell-to-local-ij 1.0.0, core 0.1.0
- Model
- H3 C cellToLocalIj (h3o 0.11): the icosahedron faces unfolded around the origin into one plane of IJ axes
- Accuracy
- The same coordinates as H3 C 4.4.1, which are whole numbers, so they agree exactly
- Notes
- None
- Cites
- Uber Technologies and the H3 contributors, H3: A Hexagonal Hierarchical Geospatial Indexing System (API reference v4); Hydronium Labs, h3o: a Rust implementation of H3
Something look off?
How we got thisFormula, worked example, sources, and proof
Model: H3 C cellToLocalIj (h3o 0.11): the icosahedron faces unfolded around the origin into one plane of IJ axes
Accuracy: The same coordinates as H3 C 4.4.1, which are whole numbers, so they agree exactly
When to use this: Use this to do grid arithmetic on H3 cells: turn cells into plane coordinates around one origin, where the difference between two cells is a vector you can add, subtract, and compare. It is how neighborhoods, offsets, and regular patterns on the grid are expressed.
Limitations: The coordinates mean nothing without their origin: the same cell has different IJ around a different anchor, so the anchor has to travel with them. The unfolding only reaches so far, and it is undefined across the twelve pentagons, where H3 refuses rather than answering wrongly. Both cells must be at one resolution.
Worked example: The cell east of downtown Pittsburgh, from its neighbor. Source: H3 cellToLocalIj.
You enter
- Cell
- 892a847148fffff
- Origin
- 892a8471487ffff
You get
- I
- 309
- J
- 2,470
- Anchor
- 892a8471487ffff
- Cell
- 892a847148fffff
Review: Not yet independently reviewed by a GIS professional.
Last verified: 2026-09-18, when a maintainer last confirmed this tool's sources at the issuer. See the sources ledger.
Status: version 1.0.0, core 0.1.0. See this tool in the verification report.
Checked against: 22 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.
Sources
- H3: A Hexagonal Hierarchical Geospatial Indexing System (API reference v4), Uber Technologies and the H3 contributors, H3 4.x documentation. Indexing, inspection, traversal, hierarchy, directed edges, vertexes, and resolution tables. Read free.
- h3o: a Rust implementation of H3, Hydronium Labs, 0.11.0 (tested against H3 C). CellIndex, LatLng, Resolution. Read free.
Terms
- H3: H3 hexagonal hierarchical index
- A global grid of hexagons (and 12 pentagons) at 16 resolutions, each cell about one-seventh the area of its parent, named by a 15-character index. Source: H3 hexagonal index
H3 — H3 hexagonal hierarchical index
A global grid of hexagons (and 12 pentagons) at 16 resolutions, each cell about one-seventh the area of its parent, named by a 15-character index.
Source: H3 hexagonal index