Drag to draw a query rectangle

R-Tree Spatial Index Explorer (2D)

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.