georust / rstar

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

Better handling of empty rects #182

Closed michaelkirk closed 2 weeks ago

michaelkirk commented 2 weeks ago

As an alternative to https://github.com/georust/rstar/pull/181, which fixes the same bug, but maintains the spirit of #162 by avoiding comparison with huge/tiny floats.

This is a draft because there are several things I'm not sure how to handle, and I'm out of time for today! But if someone is interested in building off of it, feel free!

adamreichold commented 2 weeks ago

Having thought about this a bit, I think the max/min representation of empty AABB is indeed superior and avoids additional overhead for most users (i.e. those not using fixed-precision integer coordinates), i.e. I would prefer #181 or #184 over this one.

michaelkirk commented 2 weeks ago

Superseded by https://github.com/georust/rstar/pull/184