Home▸Data Science▸R-Tree Spatial Index Explorer (2D)

R-Tree Spatial Index Explorer (2D)

Interactive 2D R-tree spatial index simulator: watch a real Guttman-style insertion algorithm build a nested bounding-box tree from scattered map objects, then drag a query rectangle to see the real R-tree search algorithm prune whole subtrees instead of scanning every row.

Data Science2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-postgis-spatial-indexing-postgres-lab ↗ Open standalone

This 2D canvas version builds a genuine R-tree from scratch — Guttman's ChooseLeaf and quadratic-split insertion algorithm, the same family of algorithm PostGIS's GiST index runs — and answers a dragged query rectangle with the real R-tree search algorithm, visually distinguishing subtrees the index pruned outright from the handful of leaf objects it actually had to check, next to what a brute-force full-table scan would have examined instead.

⚙ Under the hood

A 2D canvas R-tree spatial index built with a real Guttman-style insertion algorithm (ChooseLeaf, quadratic split): drag a query rectangle and watch the real R-tree search algorithm prune whole subtrees instead of scanning every object, next to what a brute-force scan would have examined.

r-treespatial-indexpostgisdata-structuresquery-optimizationalgorithms

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)