Question

Is it possible, in theory, to convert any tree into an R-tree? For example, let's say I have a tree of nodes each characterized by an id, value and N features. Does it make sense to convert this to an (N+2) dimensional R-tree? How would that impact search time and tree size on disk? What happens if the number of features is not constant for each node?

Was it helpful?

Solution

If the tree is not balanced, or doesn't have a controlled fanout, it won't be a proper R-tree.

Of course you can compute MBRs, and it will become a "nested rectangles tree". But there is more to an R-tree than just using rectangles; a key point of the R-tree is to be balanced.

It does clearly not make much sense to put the ID in as an additional feature. This will not lead to sensible splits. You can of course store the ID, but I'd not use it for indexing.

You really should consider the queries you want to do. Any index must be appropriate for your queries, not just for your data!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top