IGEO7 vs S2
Google's S2 library uses a fundamentally different approach to global gridding: it starts from a cube (not an icosahedron) and produces a hierarchy of quadrilateral cells. This leads to a different set of trade-offs compared to IGEO7.
Overview
| Property | IGEO7 | S2 |
|---|---|---|
| Base polyhedron | Icosahedron | Cube |
| Cell shape | Hexagons + 12 pentagons | Quadrilaterals (near-squares) |
| Projection | ISEA (equal area) | Tangent/secant sphere–cube |
| Area variation | 0% | up to ~30% |
| Resolution levels | 0–20 | 0–30 |
| Finest resolution | ~2.9 cm (res 20) | ~1 cm (level 30) |
| Index size | 64-bit uint | 64-bit uint |
| Hierarchy | Aperture 7 | Quadtree (aperture 4) |
| Pentagons | 12 per resolution | None (8 cube corners) |
| Core library | DGGRID / DGGAL | s2geometry (C++) |
| Python binding | dggrid4py, pydggal | s2sphere, pys2 |
Cell Shape: Hexagons vs Quadrilaterals
S2 cells are quadrilaterals — roughly square near the centre of each cube face, increasingly trapezoidal toward edges and corners. IGEO7 cells are hexagons (plus 12 pentagons at icosahedron vertices).
Hexagonal advantages:
- All 6 neighbours are equidistant from the cell centre (isotropic neighbourhood)
- No preferred axis — hexagonal grids avoid the row/column bias of square grids
- Better approximation of a circle for distance-based analyses
Quadrilateral advantages:
- Simple 2D addressing (i, j) within each cube face
- Natural alignment with raster data (images, DEMs)
- Familiar mental model for GIS users
Area Distortion
S2 applies a tangential projection from sphere to cube face, with a non-linear correction function to reduce (but not eliminate) area distortion. The result is approximately ±30% area variation across cells at the same level.
IGEO7's ISEA projection guarantees 0% area variation.
For analyses sensitive to cell size (density, rates, coverage fractions), IGEO7's guarantee is stronger than S2's approximation.
Hierarchy: Quadtree vs Aperture 7
S2 uses a quadtree: each cell subdivides into 4 children. This means:
- 4× more cells per resolution step (vs 7× for IGEO7)
- More resolution levels needed to reach the same physical scale
- Each S2 level covers roughly half the linear scale of the previous
IGEO7's aperture-7 steps are coarser (7× per step), so fewer levels span the same range from continental to sub-metre.
Resolution Alignment
| IGEO7 res | CLS | Approx. S2 level | S2 avg area |
|---|---|---|---|
| 5 | ~62 km | 8 | ~2,400 km² |
| 7 | ~8.9 km | 11 | ~300 km² |
| 9 | ~1.3 km | 14 | ~37 km² |
| 11 | ~181 m | 17 | ~4,600 m² |
| 14 | ~9.8 m | 23 | ~18 m² |
Note: S2 has 30 levels (0–29) vs IGEO7's 21, reflecting the smaller step size (4× vs 7× per level).
Indexing
Both use 64-bit integers, but the encoding differs:
| IGEO7 Z7 | S2 Cell ID | |
|---|---|---|
| Structure | Base cell + resolution digits | Hilbert curve position |
| Hierarchy | Explicit digit structure | Implicit in bit pattern |
| Parent | Truncate last digit | Bit shift |
| String | 2-char base + octal digits | Decimal or token string |
S2 Cell IDs encode position along a Hilbert space-filling curve mapped across the cube faces. The hierarchical parent/child relationship is encoded in the trailing bits.
When to Choose IGEO7 vs S2
Choose IGEO7 when:
- Zero area distortion is required (density, coverage statistics)
- Hexagonal topology is preferred (isotropic neighbourhood)
- OGC API DGGS compliance is needed
- Integration with DGGRID-based workflows
Choose S2 when:
- You need natural alignment with raster/image data (quadrilateral cells)
- You are integrating with existing S2-based infrastructure (Google Maps Platform, BigQuery GIS)
- Very fine resolution (< 3 cm) is needed (S2 level 30 ≈ 1 cm)
- Quadtree spatial indexing suits your data structure
Further Reading
- IGEO7 vs H3 — comparison with the other major hexagonal DGGS
- Equal Area — why area uniformity matters
- DGGS Fundamentals — broader DGGS context
- Kmoch et al. (2022). Area and Shape Distortions in Open-Source Discrete Global Grid Systems. Big Earth Data. doi:10.1080/20964471.2022.2094926