Geospatial indexes
Find coffee shops within a kilometre of me, out of a hundred million places, in under a hundred milliseconds. A normal index on latitude returns a whole band around the planet. How do maps and delivery apps do it?
In this lesson you'll learn to
- Explain why a nearby search needs a special index, rather than an index on latitude or longitude.
- Use geohashes to turn locations into prefix searches, and handle cell edges with neighbour cells.
- Explain how a quadtree splits space adaptively so crowded areas get smaller cells.
- Compare cell systems such as S2 and H3, and choose a cell size for a query.
Create a free account to open this lesson
It's free. You'll get every free lesson, quizzes that save your progress, daily flashcards and streaks.