### The R-tree (Region-tree)

• Bounding Box (BB)

• Bounding Box:

 Bounding Box = a rectangle that contains a group of objects

• Example:

• A group of objects:

• A Bounding Box for this group of objects:

• Minimum Bounding Box (MBB)

• Minimum Bounding Box:

 Minimum Bounding Box = the smallest rectangle that contains a group of objects

• Example:

• A group of objects:

• The Minimum Bounding Box for this group of objects:

• Note:

• A rectangle can be represented as follows:

 ``` Rectangle: coordinate of the lower left corner coordinate of the upper right corner ```

Example:

• R-tree

• R-tree: (Region-tree)

• R-tree = an index tree-structure derived from the B-tree that uses bounding boxes as search keys

• The internal nodes contains a number of entries of the follwoing format:

• The leaf nodes contains a number of entries of the follwoing format:

• Property of a R-tree:

• An internal node of the R-tree has the following structure:

I.e.:

• The subtree indexed by the the bounding box will contain:

 Only objects that is contained within the given bounding box !!!

• Example: R-tree

• Objects that we want to represent:

There are 7 objects:

• The 3 objects:

are completely enclosed by the bounding box ((0,0),(60,50):

• The objects:

 school, pop , house2 and pipeline

are completely enclosed by the bounding box ((20,20),(100,80):

• Here is a R-tree that uses the bounding boxes above:

Note:

• For brevity sake:

 I used mbb in each object to denote its minimum bounding box

•   Warning:

 The mbb field for different objects are different I don't want to add these details for brevity (save me time and you won't learn anything from the mbb info) !!! (You can see the location of the objects in the figure and find the mbb (min. bounding box) yourself !!!)

• Overlapping Bounding boxes in R-tree

• Notice that:

 The bounding boxes used in the internal R-tree nodes can overlap !!!

Example:

You can see the overlap clearly in this pitcure: