Skip to main content

Crate geometry_rtree

Crate geometry_rtree 

Source
Expand description

An R-tree spatial index over the geometry kernel.

Mirrors boost/geometry/index/rtree.hpp and the support headers under boost/geometry/index/detail/. Stores any Indexable value (a value with an axis-aligned bounding box) and answers spatial queries — intersects / within / contains — and k-nearest-neighbour search, pruning the tree with each node’s bounding box.

The split strategy is a type parameter of Rtree. The default is AsymmetricRStarSplit with six-child branches and 12-value leaves for insertion, and four-child branches/four-value leaves for bulk packing; symmetric RStarSplit, Quadratic, and Linear configurations remain available. Bulk loading via FromIterator uses Sort-Tile-Recursive packing for a balanced tree in one pass. See split for parameter semantics, validity constraints, tuning guidance, and the benchmark evidence behind the default.

Cartesian, 2D, f64 for v1.

Module layout:

Re-exports§

pub use bounds::Bounds;
pub use indexable::Indexable;
pub use nearest_iter::NearestIter;
pub use predicate::Predicate;
pub use query_iter::QueryIter;
pub use rtree::Rtree;
pub use split::AsymmetricQuadratic;
pub use split::AsymmetricRStarSplit;
pub use split::Linear;
pub use split::Quadratic;
pub use split::RStarSplit;
pub use split::SplitParameters;

Modules§

bounds
The axis-aligned bounding box used for tree keys.
indexable
The Indexable trait — what can be stored in an Rtree.
nearest_iter
Unbounded nearest-first streaming — the search behind Rtree::nearest_iter.
node
Tree nodes: leaves hold values, branches hold child subtrees.
predicate
Spatial query predicates.
query_iter
Lazy spatial-query iteration — the walk behind Rtree::query_iter.
rtree
The Rtree itself — insert, spatial query, nearest-neighbour, and Sort-Tile-Recursive bulk load.
split
Node-split strategies — the type parameter that governs tree shape.