Practice this topic in a realistic system design interview
Global systems often need to group, search, and count locations across the Earth.
S2 and H3 help by dividing the world into cells. Each latitude/longitude point maps to a cell ID, and that ID can be used as an index key, shard key, analytics key, map bucket, or routing key.
They solve a different problem from a custom in-memory spatial tree. Instead of inventing your own way to divide the planet, you use a standard global cell system with well-tested libraries and known edge cases.
This chapter explains how S2 and H3 create global cells, how resolution affects queries, common query patterns, and how they compare to Geohash.
Geohash is simple and useful, but it has rough edges around cell boundaries, latitude distortion, the poles, and the antimeridian, which is the line where longitude jumps from +180 to -180. Quad Trees and R-Trees handle spatial queries well, 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 is a compact key that can move cleanly through databases, caches, stream processors, metrics systems, and routing layers.
Common use cases include marketplace balancing, delivery zones, ride matching, ad targeting, heatmaps, geofencing, abuse detection, and regional analytics.