geometry_rtree/lib.rs
1//! An R-tree spatial index over the geometry kernel.
2//!
3//! Mirrors `boost/geometry/index/rtree.hpp` and the support headers
4//! under `boost/geometry/index/detail/`. Stores any [`Indexable`] value
5//! (a value with an axis-aligned bounding box) and answers spatial
6//! queries — intersects / within / contains — and k-nearest-neighbour
7//! search, pruning the tree with each node's bounding box.
8//!
9//! The split strategy is a type parameter of [`Rtree`]:
10//! [`Quadratic`] (the default) or [`Linear`]. Bulk loading via
11//! [`FromIterator`] uses Sort-Tile-Recursive packing for a balanced
12//! tree in one pass.
13//!
14//! Cartesian, 2D, `f64` for v1.
15//!
16//! Module layout:
17//!
18//! * [`bounds`] — the axis-aligned box arithmetic (area, enlargement,
19//! union, distance) the tree keys on.
20//! * [`indexable`] — the [`Indexable`] trait.
21//! * [`node`] — the leaf / branch [`Node`](node::Node) enum.
22//! * [`split`] — the [`SplitParameters`] strategies.
23//! * [`predicate`] — the query [`Predicate`]s.
24//! * [`rtree`](mod@rtree) — the [`Rtree`] and its insert / query /
25//! nearest / bulk load.
26//!
27//! [`Indexable`]: indexable::Indexable
28
29#![cfg_attr(not(feature = "std"), no_std)]
30#![forbid(unsafe_code)]
31
32extern crate alloc;
33
34pub mod bounds;
35pub mod indexable;
36pub mod node;
37pub mod predicate;
38pub mod rtree;
39pub mod split;
40
41pub use bounds::Bounds;
42pub use indexable::Indexable;
43pub use predicate::Predicate;
44pub use rtree::Rtree;
45pub use split::{Linear, Quadratic, SplitParameters};