georust / rstar

R*-tree spatial index for the Rust ecosystem
https://docs.rs/rstar
Apache License 2.0
384 stars 67 forks source link

Need to use different types for Point::Scalar and square #145

Closed stepancheg closed 7 months ago

stepancheg commented 7 months ago

If scalar is i32, distance squared is i64.

But currently RTree in operations like RTree::locate_within_distance assumes distance squared is the same type as scalar.

The workaround is for user to store data keyed by i64 when data fits within i32. This is somewhat inefficient.

adamreichold commented 7 months ago

Duplicate of #48