-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default index bounds are invalid, opposite interleave #204
Comments
would you be willing to provide a PR to address this? |
Unfortunately I'm not sure where this problem arises from. This likely relates to #197 (comment). |
I'm running into this bug in many other unexpected places. I think part of my confusion stems from the fact that $ python
>>> from rtree.index import Index
>>> idx = Index(interleaved=False)
>>> idx.insert(0, (3, 5, 2, 4))
>>> hit = list(idx.intersection(idx.bounds, objects=True))[0]
>>> hit.bounds
[3.0, 5.0, 2.0, 4.0]
>>> hit.bbox
[3.0, 2.0, 5.0, 4.0]
>>> idx = Index(interleaved=True)
>>> idx.insert(0, (3, 2, 5, 4))
>>> hit = list(idx.intersection(idx.bounds, objects=True))[0]
>>> hit.bounds
[3.0, 5.0, 2.0, 4.0]
>>> hit.bbox
[3.0, 2.0, 5.0, 4.0] Personally, I would expect |
If you have the time and enthusiasm, please rip it all out and no-op it. I think people would be excited to have |
Good to know, we were using |
Maybe it is too late to change, and we must now suffer for this sin forever by fixing all of the issues it caused. |
As far as I'm concerned, rtree is still 0.X, so you can keep changing the API and breaking backwards compatibility until a stable 1.0 release is out. |
It is a ten year old library that's used all over the place. The stability has been the 🐢 releases, and our bad release naming combined with that is likely to startle people if we did actually start breaking lots of backwards compatibility stuff at this point. My desire to fix the mistake aside, it's probably too late to remove |
I noticed the following behavior when trying to compute the number of entries in an empty index:
The bounds of an empty index have the opposite interleave pattern from the index itself. This causes a number of issues in other parts of the code as well.
The text was updated successfully, but these errors were encountered: