The STRtree: Sort-Tile-Recursive Spatial Indexing
Computing the sizing parameters of an STR-packed R-tree and stepping through the sort-and-tile bulk-loading procedure to form leaf nodes and their minimum bounding rectangles.
Tutorial
Introduction
When the full set of rectangles to be indexed is known in advance, we can build an R-tree far more efficiently than by inserting one rectangle at a time. The Sort-Tile-Recursive (STR) algorithm bulk-loads the data into a tightly packed, nearly-balanced tree by sorting on one axis at a time and slicing the sorted list into uniform groups.
For a 2D dataset of rectangles with node capacity , STR begins by computing three sizing parameters:
- Number of leaf nodes:
- Number of vertical slices:
- Rectangles per slice:
Each slice will eventually be split into leaves of rectangles, so the leaf level holds at most leaves and rectangles. The last slice (and the last leaf within it) may be partially filled when
For example, with and
We partition the 18 rectangles into 3 vertical slices of 6 rectangles each, and within each slice we form 3 leaves of 2 rectangles.