H3 & Global Grids

Give every point a cell id and half the geometry work becomes a join.

A discrete global grid replaces coordinates with cell identifiers: a string or an integer that names a hexagon or a square at a chosen resolution. That turns spatial joins into equality joins and aggregation into a group-by — at the cost of cells that are not equal in area, do not nest exactly and misbehave at the antimeridian. These guides cover H3 from resolution choice to polygon fill and hierarchy, how S2, geohash and quadkeys differ, H3 in DuckDB at scale, and the failures that make a hexagon map quietly wrong.

20 Steps in this path

The full path, in order

20 guides: the concepts underneath the work, then each task, then the errors that task produces. Work down, or jump to the step you need.

  1. H3 Explained: How a Hexagonal Grid Indexes the Whole Earth h3 hexagon index explained 🧭 Concept
  2. How to Assign Points to H3 Cells in Python h3 python points to cells ⚙️ How-To
  3. Choosing an H3 Resolution: Cell Size, Counts and What Each Level Can Show h3 resolution cell size 🧭 Concept
  4. How to Aggregate Points into H3 Hexagons and Map Them aggregate points h3 hexagons ⚙️ How-To
  5. How to Fill a Polygon with H3 Cells h3 polygon to cells python ⚙️ How-To
  6. How to Turn H3 Cells into a GeoDataFrame of Polygons h3 cells to polygons geopandas ⚙️ How-To
  7. H3 Hierarchy Explained: Parents, Children and Why They Do Not Nest Exactly h3 parent child hierarchy 🧭 Concept
  8. How to Use H3 Neighbours for k-Ring Smoothing and Buffers h3 grid_disk k ring python ⚙️ How-To
  9. How to Join Two Point Datasets on an H3 Index Instead of a Spatial Join join on h3 index ⚙️ How-To
  10. How to Use H3 in DuckDB for Grid Aggregation at Scale duckdb h3 extension ⚙️ How-To
  11. Geohash Explained: Prefixes, Precision and the Edge Problem geohash explained precision 🧭 Concept
  12. S2 Cells Explained: Squares on a Cube and When They Beat Hexagons s2 geometry cells explained 🧭 Concept
  13. How to Index Data by Quadkey and Web Map Tile quadkey python tile index ⚙️ How-To
  14. How to Compact an H3 Cell Set to Store a Region Cheaply h3 compact cells ⚙️ How-To
  15. Fixing H3 Cells in the Wrong Place: Latitude and Longitude Order h3 lat lng order wrong 🔧 Fix
  16. Fixing H3 Hexagons That Stretch Across the Map at the Antimeridian h3 antimeridian polygon 🔧 Fix
  17. Fixing H3 Polygon Fill That Misses Cells or Returns Nothing h3 polygon_to_cells empty 🔧 Fix
  18. Fixing H3 AttributeError After Upgrading: the v3 to v4 API Rename h3 has no attribute geo_to_h3 🔧 Fix
  19. Fixing an H3 Map That Misleads: Unequal Cell Areas and Empty Cells h3 cell area distortion 🔧 Fix

Topics this path covers

A path is a route; a topic is everything the site has on a subject. Open a topic to see the guides this path skips.

Other ways in