geoprimsField-grade geospatial math

H3 polygon fill (polygonToCells)

The 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.

Go the other way: H3 cell set outline (cellsToMultiPolygon) →

A published result changed on 2026-10-12: H3 polygon fill (version 1.2.0) now includes the fourth H3 containment mode, overlapping-bbox, which conservatively follows buffered boxes through… Changelog

9

The polygon fills with 9 cells by center containment.

Cells
Cell
892a8471403ffff
892a847140bffff
892a8471413ffff
892a847141bffff
892a8471447ffff
892a8471453ffff
892a8471457ffff
892a84714c7ffff
892a84714cfffff
Containment used
Estimate
Covered area
South
West
North
Provenance
Computed by
indexing.h3.polygon-to-cells 1.2.0, core 0.1.0
Model
H3 C polygonToCellsExperimental: hierarchical traversal from the 122 base cells, with point, boundary, crossing, and buffered bounding-box tests in latitude and longitude
Accuracy
Identical cell sets to H3 C 4.4.1 in all four containment modes on 1,000 random polygons with holes, antimeridian crossings, and polar edge cases
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?

Your values

Showing an example. Change anything.
KML, KMZ, GPX, GeoJSON, CSV, WKT, or WKB — or drop it on the box. Read on this device.
More options 3
Run many at once from a CSV

Loading…

How we got thisFormula, worked example, sources, and proof

Model: H3 C polygonToCellsExperimental: hierarchical traversal from the 122 base cells, with point, boundary, crossing, and buffered bounding-box tests in latitude and longitude

Accuracy: Identical cell sets to H3 C 4.4.1 in all four containment modes on 1,000 random polygons with holes, antimeridian crossings, and polar edge cases

When to use this: Use this to turn an area into cells: the H3 cells that fill a polygon, with holes and across the antimeridian, at a resolution you choose. It is how a region, a service area, or an administrative boundary becomes a set of keys that rows can be joined on.

Limitations: Which cells count as inside is a choice, not a fact, so the containment mode has to be stated: centers inside, whole cells inside, actual overlap, and overlap with H3's deliberately buffered cell box all give different sets. Overlapping-bbox is conservative and can include a cell whose own boundary does not touch the polygon. A fine resolution over a large area produces very many cells, and long edges at a fine resolution are refused. A polygon cannot take in a pole: H3 reads a ring in latitude and longitude with straight edges, so a ring at one latitude encloses no area and comes back with nothing rather than with the cap it looks like.

Worked example: A block in downtown Pittsburgh at resolution 9. Source: H3 polygonToCells. It is golden test vector v001, and every build checks the tool still gives its answer within its tolerance.

You enter

Containment
center
Polygon
40.4406, -80.002 40.4406, -79.99 40.448, -79.99 40.448, -80.002
Resolution
9

You get

Cells
9
Containment used
center
Estimate
28
Covered area
0.947955 km²
South
40.438996519°
West
-80.003535216°
North
40.448391063°
East
-79.988032515°

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.2.0, core 0.1.0. See this tool in the verification report.

Changes

Checked against: 24 golden test vectors (download the test vectors, each with its source and tolerance). See how results are checked and every source.

Sources

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