|0.11.0||May 31, 2023|
|0.10.0||Jan 31, 2023|
|0.9.3||Apr 6, 2022|
|0.9.2||Nov 18, 2021|
|0.1.0||Nov 22, 2018|
#17 in Algorithms
142,741 downloads per month
Used in 185 crates (37 directly)
A flexible, n-dimensional r*-tree implementation for the Rust ecosystem, suitable for use as a spatial index.
- A flexible r*-tree written in safe rust
- Supports custom point types
- Supports the insertion of user defined types
- Supported operations:
- Rectangle queries
- Nearest neighbor
- Nearest neighbor iteration
- Locate at point
- Element removal
- Efficient bulk loading
- Features geometric primitives that can readily be inserted into an r-tree:
- Points (arrays with a constant size)
- Small number of dependencies
- Serde support with the
no_stdcompatible (but requires
Primitives are provided for point, line, and rectangle geometries. The
geo crate uses rstar as an efficient spatial index and provides
RTreeObject implementations for storing complex geometries such as linestrings and polygons.
All benchmarks are performed on a i7-8550U CPU @ 1.80Ghz and with uniformly distributed points. The underlying point type is
|bulk loading||2000||229.82 us|
|sequentially loading||2000||1.4477 ms|
|nearest neighbor (bulk loaded tree)||100k||1.32 us|
|nearest neighbor (sequential tree)||100k||1.56 us|
|successful point lookup||100k||177.32 ns|
|unsuccessful point lookup||100k||273.51 ns|
The project is being actively developed, feature requests and PRs are welcome!
The documentation is hosted on docs.rs.
The crate can be published by the
rstar-publishers team of
georust. Please follow the steps below while publishing a
- Create branch from master, say
rstar/CHANGELOG.mddescribes all the changes since last release (esp. the breaking ones).
- Ensure / set
rstarto the new version.
- Create PR to master, have it approved and merge.
- Checkout the updated master, go to
rstardirectory and run
- Create tag
<version>and push to
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.