Java implementation of 2 dimensional interval tree

1.8k views Asked by At

I need a 2 dimensional interval tree for storing rectangular regions in a canvas.
I need to identify the regions which contain the point clicked or the regions overlapping with a rectangular selection.

Is there any standard implementation of 2 dimensional interval tree for this purpose ?

1

There are 1 answers

2
MBo On BEST ANSWER

It seems that R-tree or it's variants are suitable.

Implementation may be found here

Edit: Now rtreeportal.org site does not work (2005 snapshot), but seems there is no comparable aggregator site that contains information and implementations for different kinds of R-trees.