1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! An n-dimensional [r*-tree](https://en.wikipedia.org/wiki/R*-tree) implementation for use as a spatial index.
//!
//! This crate implements a flexible, n-dimensional r-tree implementation with
//! the r* (r star) insertion strategy.
//!
//! # R-Tree
//! An r-tree is a data structure containing _spatial data_, optimized for
//! nearest neighbor search.
//! _Spatial data_ refers to an object that has the notion of a position and extent:
//! for example points, lines and rectangles in any dimension.
//!
//!
//! # Further documentation
//! The crate's main data structure and documentation is the [RTree] struct.
//!
//! ## Primitives
//! The pre-defined primitives like lines and rectangles contained in
//! the [primitives module](crate::primitives) may be of interest for a quick start.
//! ## `Geo`
//! For use with the wider Georust ecosystem, the primitives in the [`geo`](https://docs.rs/geo/latest/geo/#types) crate
//! can also be used.
//!
//! # (De)Serialization
//! Enable the `serde` feature for [serde](https://crates.io/crates/serde) support.
//!
//! # Mint compatibility with other crates
//! Enable the `mint` feature for
//! [`mint`](https://crates.io/crates/mint) support. See the
//! documentation on the [mint] module for an expample of an
//! integration with the
//! [`nalgebra`](https://crates.io/crates/nalgebra) crate.
#![deny(missing_docs)]
#![forbid(unsafe_code)]
#![cfg_attr(not(test), no_std)]

extern crate alloc;

mod aabb;
mod algorithm;
mod envelope;
mod node;
mod object;
mod params;
mod point;
pub mod primitives;
mod rtree;

#[cfg(feature = "mint")]
pub mod mint;

#[cfg(test)]
mod test_utilities;

pub use crate::aabb::AABB;
pub use crate::algorithm::rstar::RStarInsertionStrategy;
pub use crate::algorithm::selection_functions::SelectionFunction;
pub use crate::envelope::Envelope;
pub use crate::node::{ParentNode, RTreeNode};
pub use crate::object::{PointDistance, RTreeObject};
pub use crate::params::{DefaultParams, InsertionStrategy, RTreeParams};
pub use crate::point::{Point, RTreeNum};
pub use crate::rtree::RTree;

pub use crate::algorithm::iterators;