Why it matters

Spatial queries at scale need R-trees or equivalent. Understanding enables GIS + location-based apps.

Advertisement

The architecture

Internal nodes: MBR (minimum bounding rectangle) + children.

Leaves: MBR + actual objects.

R-tree structureBounding rectangleshierarchicalQuery intersectprune non-overlappingEfficient spatial searchlog nVariants: R*-tree (better insertion), R+-tree, Hilbert R-tree — improve query performance
R-tree navigation.
Advertisement

How it works end to end

Insertion: choose subtree with smallest MBR expansion.

Split: when node overflows.

Query: traverse only branches whose MBR intersects query region.

Applications: PostGIS, spatial indexes in databases, GIS software.