Skip to content
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

Thoughts about the feasibility of adding a RTree::relocate_with_selection_function() method #176

Open
WildRackoon opened this issue Sep 14, 2024 · 0 comments

Comments

@WildRackoon
Copy link

WildRackoon commented Sep 14, 2024

If I am not mistaken, currently the only way to change the envelope of an RTreeObject within the tree is to remove then re-insert it somewhere else later.
Most generically using:

  • Either remove_with_selection_function() or drain_with_selection_function()
  • Then using insert()

I am not familiar with all the technical details of rstar, but like most trees, I believe there may be some optimization to be done in some area:

  • Moving an RTreeObject within the same leaf
  • If the move is small, going up leaves would be faster than looking to insert from the root (That would require choosing a Strategy / Policy)

It would probably need some work for all primitives, like GeomWithData.

Resulting methods would probably look like:

  • pub fn relocate_with_selection_function<F> (&mut self, function: F, new_envelope: RTreeObject) -> Option<T>
  • pub fn relocate_all_with_selection_function<F>(&mut self, function: F, new_envelope: RTreeObject) -> Option<T>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant