Spatial Data Structure

Domain: Data Structures

🎯 Motivation

When data has location (coordinates on a map, 3D objects in a game), spatial structures organise it by position for fast geographic queries.

πŸ“‹ Concrete Example

A quadtree divides a 2D map into four quadrants, recursively. β€˜Find all restaurants within 1 km’ becomes checking only the relevant quadrants.

πŸ”— Analogy

A city divided into districts, each divided into blocks, each into buildings. Finding a restaurant nearby means checking only your district, not the entire city.