Crates.io | rstar |
lib.rs | rstar |
version | 0.12.2 |
source | src |
created_at | 2018-11-22 22:26:45.2039 |
updated_at | 2024-11-05 21:59:23.790625 |
description | An R*-tree spatial index |
homepage | |
repository | https://github.com/georust/rstar |
max_upload_size | |
id | 98213 |
size | 193,379 |
A flexible, n-dimensional r*-tree implementation for the Rust ecosystem, suitable for use as a spatial index.
serde
featureno_std
compatible (but requires alloc
)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 [f64; 2]
.
Benchmark | Tree size | Time |
---|---|---|
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
new release.
release/<version>
.rstar/CHANGELOG.md
describes all the changes
since last release (esp. the breaking ones).version
metadata in Cargo.toml
of
rstar
to the new version.rstar
directory and
run cargo publish
.<version>
and push to georust/rstar
Licensed under either of
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.