Workiva / go-datastructures

A collection of useful, performant, and threadsafe Go datastructures.
Apache License 2.0
7.66k stars 834 forks source link

Will rtree recognize coordinate/dimension changes of inserted rects? #214

Open Robert-M-Muench opened 3 years ago

Robert-M-Muench commented 3 years ago

If I have a rtree where I insert 50 rectangles and change the coordinates/dimensions of some rectangles afterwards, will rtree recognize this and adapt the internal data structure to work correctly? Or do I have to somehow let the tree know, that some rectangles changed?

Robert-M-Muench commented 3 years ago

I think the safest way is to remove and re-insert nodes even the code looks like it does a "check and run" before every search, which I understand as bringing the tree into a consistent state.