1

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 ?

OmG
  • 18,337
  • 10
  • 57
  • 90
Nullpoet
  • 10,949
  • 20
  • 48
  • 65

1 Answers1

0

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.

MBo
  • 77,366
  • 5
  • 53
  • 86
  • the second link has no thing to do with r tree, is that a mistake? btw I have not downvote this but I am also wondering why this is accepted as answer if the link does not work? – Maytham Fahmi Jan 18 '17 at 19:59
  • @maytham-ɯɐɥʇʎɐɯ Five-years old link is dead. It is tedious.. but happens. (In that time rtreeportal contained a lot of useful material and implementations for different kinds of r-trees) – MBo Jan 19 '17 at 06:30