georust / rstar

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

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

Closed stepancheg closed 11 months ago

stepancheg commented 11 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 11 months ago

Duplicate of #48