hprtree
About
This is a Hilbert-Packed-R-Tree implementation for rust (maybe see Wikipedia).
The (C++) code that handles the mapping between coordinates and hilbert index was not written by me and can be found on GitHub along with links to interesting writeups on https://threadlocalmutex.com.
Example usage
use ;
let mut index = new;
index.insert;
for _ in 0..2
index.insert;
index.insert;
for _ in 0..5
let index = index.build;
let mut result = Vec with_capacity;
index.query_with_list;
assert!; // this Vec now contains the &strs "Bob", "Alice"(x2) and "James"
for i in result
There are more examples in hprtree.rs, hprtree_wrapping.rs (where the example above is from) and in _examples/