Last Updated: May 26, 2026
Global systems often need to group, query, and aggregate locations across the entire Earth.
S2 and H3 are hierarchical spatial cell systems. They turn latitude and longitude into cell IDs that can be used for indexing, sharding, analytics, map aggregation, and regional routing.
They solve a different problem from a custom in-memory spatial tree. Instead of building your own geometry partitioning from scratch, you use a well-defined global cell system with library support and known edge cases.
Geohash is simple and useful, but it has awkward behavior around cell boundaries, latitude distortion, poles, and the antimeridian. Quad Trees and R-Trees are powerful, but they are usually tied to an in-memory index or a database spatial engine.
S2 and H3 give distributed systems a reusable way to name regions of the Earth. A cell ID becomes a compact key that can flow through databases, caches, stream processors, metrics systems, and routing layers.
Common use cases include marketplace balancing, delivery zones, ride matching, ads targeting, heatmaps, geofencing, abuse detection, and regional analytics.