H3
Uber's H3 hexagonal grid.
H3 is Uber's hexagonal grid: 16 resolutions, each cell about one seventh the area of its parent, with 12 pentagons at every resolution. These tools index points, inspect cells, walk the hierarchy, search rings and paths, fill polygons, and outline sets of cells. Analysts and developers use H3 to aggregate points, join datasets, and search neighborhoods. Start with the resolution chooser to pick a cell size, then the point-to-cell tool. Pitfall: near a pentagon a cell has five neighbors, not six, so code that expects fixed ring sizes can break.
No tools here match . or .
I want to find the H3 cell for a point, or inspect a cell
- H3 cell for a point
The H3 cell containing a latitude and longitude at resolution 0 to 15 (latLngToCell), with the cell's center and area.
- H3 cell inspector
Everything about an H3 cell: center (cellToLatLng), boundary (cellToBoundary), resolution, base cell, pentagon and Class III checks, area, and decimal form.
- H3 edges and vertexes
The directed edges (with lengths and neighbors) and vertexes of an H3 cell (originToDirectedEdges, cellToVertexes).
- H3 cell to latitude and longitude
The latitude and longitude of an H3 cell's center, with the cell's resolution.
- H3 cell boundary
The vertices of an H3 cell's boundary in order, ready to draw the hexagon or pentagon on a map.
- H3 cell resolution
The resolution of an H3 cell, 0 (coarsest) to 15 (finest), with H3's average hexagon area at that resolution.
- H3 base cell
Which of H3's 122 resolution 0 base cells an H3 cell descends from, and whether that base cell is a pentagon.
- Is this H3 cell a pentagon?
Whether an H3 cell is one of the twelve pentagons at its resolution, which have five neighbors instead of six.
- H3 resolution class check
Whether an H3 cell's resolution is Class III (odd resolutions, rotated about 19.1° from the previous) or Class II (even).
- Validate an H3 index
Whether a string is a valid H3 cell index, and if not, why not.
- H3 cell area
The exact area of one H3 cell on H3's sphere, with its resolution's average hexagon area for comparison.
- H3 directed edges
The directed edges leading out of an H3 cell, one to each neighbor, as H3 edge indexes.
- H3 vertexes
The topological vertexes of an H3 cell as H3 vertex indexes, with each vertex's latitude and longitude.
- H3 edge length
The length of one H3 directed edge on the ground, with the cells on either side of it.
I want to choose a resolution
- H3 resolution chooser
The H3 resolution whose average cell is closest to a target area or edge length, with the full resolution table (122 base cells, 12 pentagons at each resolution).
I want to move up or down the hierarchy
- H3 parent cell
The coarser H3 cell that contains a cell (cellToParent), and the cell's position among that parent's children.
- H3 children cells
The finer H3 cells inside a cell (cellToChildren), their count, and the center child.
- H3 compact
Replaces every complete group of 7 sibling cells with their parent, repeatedly, for the smallest set covering the same area (compactCells).
- H3 uncompact
Expands a mixed-resolution set of H3 cells to one resolution (uncompactCells).
- H3 center child
The child cell at the center of an H3 cell, at a finer resolution.
- H3 child position
Where an H3 cell falls in the ordered list of its ancestor's children, and the ancestor at the resolution asked for.
I want to find cells around or between cells
- H3 grid disk (k-ring)
All H3 cells within k steps of a cell (gridDisk); fewer than 3k(k+1)+1 when a pentagon is nearby.
- H3 grid ring
The H3 cells exactly k steps from a cell (gridRing), the hollow ring.
- H3 grid path and distance
The grid distance between two H3 cells (gridDistance) and the line of cells joining them (gridPathCells).
- H3 grid distance
The number of H3 grid steps between two cells of the same resolution.
I want to do grid arithmetic around an origin cell
- 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 H3 unfolds around that origin.
- H3 cell at local IJ (localIjToCell)
The H3 cell at local IJ coordinates around an origin cell, undoing cellToLocalIj.
I want to fill a polygon with cells
- H3 polygon fill (polygonToCells)
The H3 cells that fill a polygon (with holes, across the antimeridian) at a resolution, by an explicit containment mode: centers, full cells, overlap, or buffered bounding-box overlap.
I want to outline a set of cells as a polygon
- H3 cell set outline (cellsToMultiPolygon)
The outline of a set of H3 cells: the boundary between the set and everything outside it, as polygons with their holes, in GeoJSON.
Workflows that use these tools
- Developer: index to area: Choose an H3 resolution for the cell size you want, index a point, inspect its cell and neighbors, and fill an area.