From 47b6c8b8f2c181b396098f94ebc6708740cfa198 Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Mon, 6 Jan 2025 09:21:52 -0800 Subject: [PATCH] Bump rust library to 0.2 (#99) --- CHANGELOG.md | 51 +++++++++++++++++++++++++++++++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 2 +- python/CHANGELOG.md | 10 +++++++++ src/indices.rs | 3 ++- 6 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..7ff0062 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,51 @@ +# Changelog + +**This is the changelog for the core Rust library**. There's a [separate changelog](./python/CHANGELOG.md) for the Python bindings. + +## [0.2.0] - 2025-01-06 + +### Breaking + +- Use u32 and u16 in public API for num_items and node_size by @kylebarron in https://github.com/kylebarron/geo-index/pull/69 +- Rename `OwnedRTree` to `RTree` and `OwnedKDTree` to `KDTree` by @kylebarron in https://github.com/kylebarron/geo-index/pull/81 + +### Bug fixes + +- Fix `intersection_candidates_with_other_tree` by @kylebarron in https://github.com/kylebarron/geo-index/pull/51 +- Improve precision in f64 to f32 box cast by @kylebarron in https://github.com/kylebarron/geo-index/pull/76 +- Avoid panic for rtree with one item by @kylebarron in https://github.com/kylebarron/geo-index/pull/91 + +### New Features + +- Implement nearest neighbor searches on RTree by @kylebarron in https://github.com/kylebarron/geo-index/pull/79 +- Add geo-traits integration by @kylebarron in https://github.com/kylebarron/geo-index/pull/71 + - Implement RectTrait for Node by @kylebarron in https://github.com/kylebarron/geo-index/pull/75 +- KDTree traversal by @kylebarron in https://github.com/kylebarron/geo-index/pull/96 +- Expose RTreeMetadata & KDTreeMetadata (allowing you to infer the memory usage a tree would incur) by @kylebarron in https://github.com/kylebarron/geo-index/pull/77 + +### Performance + +- Remove unnecessary `Cow` in kdtree trait by @kylebarron in https://github.com/kylebarron/geo-index/pull/72 + +### Documentation + +- Use "immutable" over "static" wording in docs by @kylebarron in https://github.com/kylebarron/geo-index/pull/70 +- improved rtree & kdtree docs by @kylebarron in https://github.com/kylebarron/geo-index/pull/93 + +### What's Changed + +- Don't panic for accessing level out of bounds by @kylebarron in https://github.com/kylebarron/geo-index/pull/49 + +### New Contributors + +- @H-Plus-Time made their first contribution in https://github.com/kylebarron/geo-index/pull/55 + +**Full Changelog**: https://github.com/kylebarron/geo-index/compare/v0.1.1...v0.2.0 + +## [0.1.1] - 2024-01-14 + +- Updated benchmarks in documentation by @kylebarron in #27 + +## [0.1.0] - 2024-01-14 + +- Initial public release. diff --git a/Cargo.lock b/Cargo.lock index 3c0f0cc..a4d40dd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -461,7 +461,7 @@ dependencies = [ [[package]] name = "geo-index" -version = "0.1.1" +version = "0.2.0" dependencies = [ "bytemuck", "criterion", diff --git a/Cargo.toml b/Cargo.toml index 61c45a7..41269d4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "geo-index" -version = "0.1.1" +version = "0.2.0" authors = ["Kyle Barron "] edition = "2021" rust-version = "1.75" diff --git a/README.md b/README.md index 032c983..5425153 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ A Rust crate for packed, immutable, zero-copy spatial indexes. - Queries return insertion indexes into the input set, so you must manage your own collections. - Only the set of coordinate types that exist in JavaScript are allowed, to maintain FFI compatibility with the reference JavaScript implementations. Hence this does not support other types like `u64`. -## Alternatives +## Alternative crates - [`rstar`](https://github.com/georust/rstar): a dynamic RTree implementation. - [`kdtree`](https://github.com/mrhooray/kdtree-rs): a dynamic KDTree implementation. diff --git a/python/CHANGELOG.md b/python/CHANGELOG.md index aee97fd..3a65433 100644 --- a/python/CHANGELOG.md +++ b/python/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## Unreleased + +- Raise runtime warning for debug builds by @kylebarron in https://github.com/kylebarron/geo-index/pull/63 +- RTree Buffer protocol, python binding tests by @H-Plus-Time in https://github.com/kylebarron/geo-index/pull/55 +- Python: Return boxes as arrow from RTree by @kylebarron in https://github.com/kylebarron/geo-index/pull/89 +- Update Python API & implement RTree partitions, nearest neighbor search by @kylebarron in https://github.com/kylebarron/geo-index/pull/87 +- Update python bindings by @kylebarron in https://github.com/kylebarron/geo-index/pull/78 +- Add `__repr__` to Python classes by @kylebarron in https://github.com/kylebarron/geo-index/pull/84 +- Python docs website & improved rtree & kdtree docs by @kylebarron in https://github.com/kylebarron/geo-index/pull/93 + ## [0.1.0] - 2024-03-26 - Initial public release. diff --git a/src/indices.rs b/src/indices.rs index 31aad32..e4f94cf 100644 --- a/src/indices.rs +++ b/src/indices.rs @@ -1,4 +1,5 @@ -//! Data structures to hold indices that may be either `u16` or `u32` to save space. +//! Data structures to hold insertion and internal tree indices that may be either `u16` or `u32` +//! to save space. use bytemuck::{cast_slice, cast_slice_mut};