Skip to content

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

Open
@WildRackoon

Description

@WildRackoon

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions