3

What is the steps of the insertion algorithm of R* Tree?

Note: I want to be able to construct the tree by insertion. IT ALWAYS GIVES ME CRAP TREES with maximum overlap and maximum area cover not matter what condition I choose for selecting the best leaf (test minimum overlap area after adding at each level of the tree, minimum expansion ration at each level of the tree, etc).

Now how this R* Tree is constructed by insertion so beautifully (from Wikipedia):

enter image description here

Kaveh Shahbazian
  • 13,088
  • 13
  • 80
  • 139
  • 2
    Care to share the code that's giving you problems? It might just be a dumb bug in an unexpected location. (That's the sort of thing that catches me out in my programming…) – Donal Fellows Dec 07 '12 at 15:18
  • @Donal Fellows I like to; but the code for insertion got big and now is a spaghetti dish (after 5 days of struggling) that needs to be cleaned! And the code is big; but I will try to post the insertion portion after I cleaned up a bit. – Kaveh Shahbazian Dec 07 '12 at 19:48
  • Did you ever solve this? I am ending up at same conclussion. – Poul K. Sørensen Sep 05 '16 at 11:02
  • Yes; though it was about four years ago and I do not remember the details. But actually the problem changed at that time. I had to create this R-Tree once (no dynamic insertions). And doing that was much easier. I actually ended up to use the same approach I've used for creating a kd-tree. Sorting by x; make N partitions; then in each partition sort by y; make N partitions and so on and so on. And the performance was superb (all in-memory). But it was not a dynamic tree. – Kaveh Shahbazian Sep 05 '16 at 13:58

1 Answers1

0

The R*-Tree is not just a different insertion leaf strategy.

The spitting strategy (perimeter!) is just as important, as it prefers "quadratic" pages, as opposed to the slices produced by other strategies such as Ang-Tan.

Furthermore, and this is maybe the key to getting prettier trees, the R*-tree performs a kind of rebalancing to actively avoid bad splits. Instead of splitting, when a node is overfull, it also removes the least central elements (or subtrees - you need this at all levels) and reinserts them. This doesn't always prevent the overflow, but it may reduce overlap in a tree.

But of course you can do various mistakes in implementing, and the R-tree will still work, just not perform well because of the bad structure. How bad is your tree, do you have a screenshot?

Has QUIT--Anony-Mousse
  • 76,138
  • 12
  • 138
  • 194