RTreeIndex.bulkLoad constructor
Bulk-load an index from (rowid, bbox) pairs using sort-tile-recursive
packing. Produces a balanced tree without per-row splits and is the
preferred constructor for large static sets.
Implementation
factory RTreeIndex.bulkLoad(
int dims,
List<MapEntry<int, BBox>> items, {
int maxEntries = 16,
}) {
final idx = RTreeIndex(dims, maxEntries: maxEntries);
if (items.isEmpty) return idx;
final leaves =
items.map((e) => _Entry.leaf(e.key, e.value)).toList(growable: false);
idx._root = idx._packLevel(leaves, isLeaf: true);
return idx;
}