server/rtree library

In-memory R-tree spatial index over axis-aligned bounding boxes in arbitrary dimension. Supports bulk-load, point insertion, deletion by rowid, and range (bounding-box intersection) queries.

Node splits use Guttman's linear split heuristic. Bulk loads use the straightforward "sort-tile recursive" (STR) algorithm, which produces a well-balanced tree without needing repeated splits.

Classes

BBox
A closed axis-aligned bounding box in dims dimensions. The first dims entries of bounds are the per-axis minima and the next dims are the maxima.
RTreeIndex
An in-memory R-tree spatial index. Each indexed item has an int rowid and a BBox of fixed dimensionality.