Skip to content

Interactive Demo

The five stages of boundary tracing and buffering, on live maps. Demo cell: 872830828ffffff (resolution 7, San Francisco), traced at resolution 10.

1. The cell itself

The plain hexagon H3 draws for the cell — cell_boundary_to_geojson().

2. Its boundary cells

children_on_boundary_faces() — the resolution-10 descendants on its edge. Note how they straddle the hexagon rather than staying inside it.

3. The merged outline

cell_boundary_from_children() — those cells fused into one polygon: the cell's true footprint.

4. Buffered, accurate

get_buffered_boundary_polygon() — the outline grown by a safety margin, guaranteed to contain every descendant.

5. Buffered, fast

The same guarantee via a convex hull (use_convex_hull=True) — simpler and ~20× faster, at the cost of extra area. The accurate polygon is ghosted for comparison.

The data behind these maps is generated by docs/generate_demo_data.py; the same workflow runs in notebook/demo_generation.ipynb.