I am with a problem where a high dimension interval tree may help. I can understand how a unidimensional interval tree works. But I can't see how should be implemented in a higher dimension.
Interval Tree and Range Tree
The explanation at Wikipedia says to use a range tree and a interval tree for each dimension. But I can't see how it works! The explanation there is not clear for me... Please, check the "Higher dimensions" section:
First, a range tree in N dimensions is constructed that allows efficient retrieval of all intervals with beginning and end points inside the query region R. Once the corresponding ranges are found, the only thing that is left are those ranges that enclose the region in some dimension.
If the range tree is more efficient, why do we need Interval Trees??
Going for Range Trees, we can see it was made for query points inside a interval (the tree does not stores intervals). Therefore, I am assuming that Wikipedia means:
First, a range tree in N dimensions is constructed that allows efficient retrieval of all intervals with beginning OR end points inside the query region R.
Then.. What? If I create a Interval Tree for each dimension from this point, any of these intervals will lie over my search box even if the original objects do not intersect my query. Please check the follow image to try to visualize what I am saying.
Maybe, what is not clear for me is: How do I cross the interval results of both Interval Trees to ensure that it lies over an entity?
Could someone give an explanation how to use range trees in this case?
R Tree
Just to mention, I am aware about the existence of R Tree. But I want to understand the Interval Tree in high dimension first. Moreover, just as a note, at Wikipedia they say:
Interval tree – A degenerate R-tree for one dimension (usually time).
What I strongly do not agree. Otherwise, why we should be talking about High Dimension Interval Tree? If I understand both methods well:
R Tree uses MBR to group entities, while Interval Tree uses points.
R Tree may stores any kind of spatial entity, while Interval Tree stores only intervals.
R Tree needs to split nodes from time to time, what seems to be expensive. Interval Tree never splits a node.