Introduction
In some of the previous sets of notes we examined many different variants of
search trees.
In this set of notes we will examine a special variant of the Btree
which is suited to representing spatial data.
RTrees
Spatial data are the types of objects which are utilized frequently in many
different application areas.
Computerassisted design (CAD), geographical
data, and VLSI design layout are examples of application areas in which spatial
data is created, searched, and deleted.
This type of data requires special data
structures to process in an efficient manner.
For example, we might request
that all counties in an area specified by geographical coordinates be printed or
that all buildings within walking distance from a particular police station be
identified.
There have been many different data structures that have been
developed to represent this type of data, Rtrees were one of the first structures
developed to handle such data and are still commonly used.
There have been,
as with most of the advanced tree structures that we have examined, several
variants of Rtrees including R
+
trees and R
*
trees.
A Rtree is a heightbalanced tree which is an extended variant of the Btree.
Objects are represented in an Rtree by their minimum bounding rectangle
(MBR).
Rtree are characterized by the following properties:
1.
Every leaf node contains between
m
and
M
index records (where
m
≤
M/
2),
unless it is the root.
2.
For each index record (
I
,
tupleidentifier
) in a leaf node,
I
is the minimum
bounding rectangle that spatially contains the
m
dimensional data object
represented by the indicated tuple.
3.
Every internal node has between
m
and
M
children, unless it is the root.
4.
For each entry (
I, childpointer
) in an internal node,
I
is the minimum
bounding rectangle that spatially contains the rectangles in the child node.
5. The root node has at least two children unless it is a leaf node.
6. All the leaf nodes appear on the same level.
7. All MBRs have sides parallel to the axis of a global coordinate system as
shown in Figure 1.
RTrees 
1
Advanced Tree Structures –
R

Trees (14)
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Documentc
b
d
e
g
f
Figure 1 – A collection of spatial objects.
Each node in the tree corresponds to a disk page.
A leaf node consists of a
number of entries with the form: (
I, tupleid
), where
I
is an MBR, and a
tupleid
is
the unique identifier for the tuple in the database holding the object
corresponding to that MBR.
I
is represented as
I = (I
0
, …, I
m1
),
where
I
i
is a
closed, bounded interval [a, b] along direction
i
.
Nonfinite intervals can also be
considered, by having
a
,
b
, or both equal to infinity.
Internal nodes are composed of a number of entries of the form: (
I, childptr
)
where
I
is the MBR for all rectangles in the lower node (the child node) pointed
to by
childptr
.
Each node in the tree can have a maximum of
M
entries and a
minimum of
m
(where
m
≤
M/2
) entries, unless it is the root.
The root node has
at least two children, unless it is a leaf.
This is the end of the preview. Sign up
to
access the rest of the document.
 Summer '09
 Computer Science, SEPTA Regional Rail, Tree structure

Click to edit the document details