質問

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?

役に立ちましたか?

解決

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!

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top