Image for R-tree

R-tree

An R-tree is a data structure used to organize and quickly retrieve spatial information, such as locations, shapes, or regions. Think of it as a digital filing system that groups nearby objects into nested rectangles, making it easier and faster to find all items within a certain area—like finding all stores in a city block. Instead of searching every individual item, the R-tree checks relevant groups first, reducing search time significantly. It’s widely used in geographic information systems (GIS), mapping, and spatial databases to manage and query data efficiently.