We can use contains to decide whether a point is already inserted to the tree or not. Here is an example:
use rstar::RTree;
fn main() {
let tree = RTree::bulk_load(vec![(0, 0), (1, 2), (8, 5)]);
println!("{}", tree.contains(&(1, 2)));
println!("{}", tree.contains(&(100, 100)));
}
Output:
true
false
➡️ Next: Nearest Neighbor Queries
📘 Back: Table of contents