<s>
The	O
R-trees	B-Library
are	O
tree	B-Application
data	I-Application
structures	I-Application
used	O
for	O
spatial	O
access	O
methods	O
,	O
i.e.	O
,	O
for	O
indexing	O
multi-dimensional	O
information	O
such	O
as	O
geographical	O
coordinates	O
,	O
rectangles	O
or	O
polygons	B-General_Concept
.	O
</s>
<s>
The	O
R-tree	B-Library
was	O
proposed	O
by	O
Antonin	O
Guttman	O
in	O
1984	O
and	O
has	O
found	O
significant	O
use	O
in	O
both	O
theoretical	O
and	O
applied	O
contexts	O
.	O
</s>
<s>
A	O
common	O
real-world	O
usage	O
for	O
an	O
R-tree	B-Library
might	O
be	O
to	O
store	O
spatial	O
objects	O
such	O
as	O
restaurant	O
locations	O
or	O
the	O
polygons	B-General_Concept
that	O
typical	O
maps	O
are	O
made	O
of	O
:	O
streets	O
,	O
buildings	O
,	O
outlines	O
of	O
lakes	O
,	O
coastlines	O
,	O
etc	O
.	O
</s>
<s>
The	O
R-tree	B-Library
can	O
also	O
accelerate	O
nearest	B-Algorithm
neighbor	I-Algorithm
search	I-Algorithm
for	O
various	O
distance	O
metrics	O
,	O
including	O
great-circle	O
distance	O
.	O
</s>
<s>
The	O
key	O
idea	O
of	O
the	O
data	O
structure	O
is	O
to	O
group	O
nearby	O
objects	O
and	O
represent	O
them	O
with	O
their	O
minimum	B-Algorithm
bounding	I-Algorithm
rectangle	I-Algorithm
in	O
the	O
next	O
higher	O
level	O
of	O
the	O
tree	O
;	O
the	O
"	O
R	O
"	O
in	O
R-tree	B-Library
is	O
for	O
rectangle	O
.	O
</s>
<s>
Since	O
all	O
objects	O
lie	O
within	O
this	O
bounding	B-Algorithm
rectangle	I-Algorithm
,	O
a	O
query	O
that	O
does	O
not	O
intersect	O
the	O
bounding	B-Algorithm
rectangle	I-Algorithm
also	O
cannot	O
intersect	O
any	O
of	O
the	O
contained	O
objects	O
.	O
</s>
<s>
Similar	O
to	O
the	O
B-tree	B-Architecture
,	O
the	O
R-tree	B-Library
is	O
also	O
a	O
balanced	O
search	O
tree	O
(	O
so	O
all	O
leaf	B-Data_Structure
nodes	I-Data_Structure
are	O
at	O
the	O
same	O
depth	O
)	O
,	O
organizes	O
the	O
data	O
in	O
pages	O
,	O
and	O
is	O
designed	O
for	O
storage	O
on	O
disk	O
(	O
as	O
used	O
in	O
databases	O
)	O
.	O
</s>
<s>
It	O
also	O
guarantees	O
a	O
minimum	O
fill	O
(	O
except	O
for	O
the	O
root	B-Application
node	I-Application
)	O
,	O
however	O
best	O
performance	O
has	O
been	O
experienced	O
with	O
a	O
minimum	O
fill	O
of	O
30%	O
–	O
40%	O
of	O
the	O
maximum	O
number	O
of	O
entries	O
(	O
B-trees	B-Architecture
guarantee	O
50%	O
page	O
fill	O
,	O
and	O
B*	O
-trees	O
even	O
66%	O
)	O
.	O
</s>
<s>
The	O
reason	O
for	O
this	O
is	O
the	O
more	O
complex	O
balancing	O
required	O
for	O
spatial	O
data	O
as	O
opposed	O
to	O
linear	O
data	O
stored	O
in	O
B-trees	B-Architecture
.	O
</s>
<s>
As	O
with	O
most	O
trees	O
,	O
the	O
searching	O
algorithms	O
(	O
e.g.	O
,	O
intersection	O
,	O
containment	O
,	O
nearest	B-Algorithm
neighbor	I-Algorithm
search	I-Algorithm
)	O
are	O
rather	O
simple	O
.	O
</s>
<s>
The	O
key	O
idea	O
is	O
to	O
use	O
the	O
bounding	B-Algorithm
boxes	I-Algorithm
to	O
decide	O
whether	O
or	O
not	O
to	O
search	O
inside	O
a	O
subtree	B-Application
.	O
</s>
<s>
Like	O
B-trees	B-Architecture
,	O
R-trees	B-Library
are	O
suitable	O
for	O
large	O
data	O
sets	O
and	O
databases	O
,	O
where	O
nodes	O
can	O
be	O
paged	O
to	O
memory	O
when	O
needed	O
,	O
and	O
the	O
whole	O
tree	O
cannot	O
be	O
kept	O
in	O
main	O
memory	O
.	O
</s>
<s>
Even	O
if	O
data	O
can	O
be	O
fit	O
in	O
memory	O
(	O
or	O
cached	O
)	O
,	O
the	O
R-trees	B-Library
in	O
most	O
practical	O
applications	O
will	O
usually	O
provide	O
performance	O
advantages	O
over	O
naive	O
check	O
of	O
all	O
objects	O
when	O
the	O
number	O
of	O
objects	O
is	O
more	O
than	O
few	O
hundred	O
or	O
so	O
.	O
</s>
<s>
To	O
maintain	O
in-memory	O
computing	O
for	O
R-tree	B-Library
in	O
a	O
computer	O
cluster	O
where	O
computing	O
nodes	O
are	O
connected	O
by	O
a	O
network	O
,	O
researchers	O
have	O
used	O
RDMA	B-General_Concept
(	O
Remote	B-General_Concept
Direct	I-General_Concept
Memory	I-General_Concept
Access	I-General_Concept
)	O
to	O
implement	O
data-intensive	O
applications	O
under	O
R-tree	B-Library
in	O
a	O
distributed	O
environment	O
.	O
</s>
<s>
This	O
approach	O
is	O
scalable	O
for	O
increasingly	O
large	O
applications	O
and	O
achieves	O
high	O
throughput	O
and	O
low	O
latency	O
performance	O
for	O
R-tree	B-Library
.	O
</s>
<s>
The	O
key	O
difficulty	O
of	O
R-tree	B-Library
is	O
to	O
build	O
an	O
efficient	O
tree	O
that	O
on	O
one	O
hand	O
is	O
balanced	O
(	O
so	O
the	O
leaf	B-Data_Structure
nodes	I-Data_Structure
are	O
at	O
the	O
same	O
height	O
)	O
on	O
the	O
other	O
hand	O
the	O
rectangles	O
do	O
not	O
cover	O
too	O
much	O
empty	O
space	O
and	O
do	O
not	O
overlap	O
too	O
much	O
(	O
so	O
that	O
during	O
search	O
,	O
fewer	O
subtrees	B-Application
need	O
to	O
be	O
processed	O
)	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
original	O
idea	O
for	O
inserting	O
elements	O
to	O
obtain	O
an	O
efficient	O
tree	O
is	O
to	O
always	O
insert	O
into	O
the	O
subtree	B-Application
that	O
requires	O
least	O
enlargement	O
of	O
its	O
bounding	B-Algorithm
box	I-Algorithm
.	O
</s>
<s>
Most	O
of	O
the	O
research	O
and	O
improvements	O
for	O
R-trees	B-Library
aims	O
at	O
improving	O
the	O
way	O
the	O
tree	O
is	O
built	O
and	O
can	O
be	O
grouped	O
into	O
two	O
objectives	O
:	O
building	O
an	O
efficient	O
tree	O
from	O
scratch	O
(	O
known	O
as	O
bulk-loading	O
)	O
and	O
performing	O
changes	O
on	O
an	O
existing	O
tree	O
(	O
insertion	O
and	O
deletion	O
)	O
.	O
</s>
<s>
R-trees	B-Library
do	O
not	O
guarantee	O
good	O
worst-case	B-General_Concept
performance	I-General_Concept
,	O
but	O
generally	O
perform	O
well	O
with	O
real-world	O
data	O
.	O
</s>
<s>
While	O
more	O
of	O
theoretical	O
interest	O
,	O
the	O
(	O
bulk-loaded	O
)	O
Priority	B-Data_Structure
R-tree	I-Data_Structure
variant	O
of	O
the	O
R-tree	B-Library
is	O
worst-case	B-General_Concept
optimal	O
,	O
but	O
due	O
to	O
the	O
increased	O
complexity	O
,	O
has	O
not	O
received	O
much	O
attention	O
in	O
practical	O
applications	O
so	O
far	O
.	O
</s>
<s>
When	O
data	O
is	O
organized	O
in	O
an	O
R-tree	B-Library
,	O
the	O
neighbors	O
within	O
a	O
given	O
distance	O
r	O
and	O
the	O
k	B-General_Concept
nearest	I-General_Concept
neighbors	I-General_Concept
(	O
for	O
any	O
Lp-Norm	O
)	O
of	O
all	O
points	O
can	O
efficiently	O
be	O
computed	O
using	O
a	O
spatial	O
join	O
.	O
</s>
<s>
This	O
is	O
beneficial	O
for	O
many	O
algorithms	O
based	O
on	O
such	O
queries	O
,	O
for	O
example	O
the	O
Local	B-Algorithm
Outlier	I-Algorithm
Factor	I-Algorithm
.	O
</s>
<s>
DeLi-Clu	O
,	O
Density-Link-Clustering	O
is	O
a	O
cluster	B-Algorithm
analysis	I-Algorithm
algorithm	O
that	O
uses	O
the	O
R-tree	B-Library
structure	O
for	O
a	O
similar	O
kind	O
of	O
spatial	O
join	O
to	O
efficiently	O
compute	O
an	O
OPTICS	B-Algorithm
clustering	O
.	O
</s>
<s>
Data	O
in	O
R-trees	B-Library
is	O
organized	O
in	O
pages	O
that	O
can	O
have	O
a	O
variable	O
number	O
of	O
entries	O
(	O
up	O
to	O
some	O
pre-defined	O
maximum	O
,	O
and	O
usually	O
above	O
a	O
minimum	O
fill	O
)	O
.	O
</s>
<s>
Each	O
entry	O
within	O
a	O
non-leaf	O
node	O
stores	O
two	O
pieces	O
of	O
data	O
:	O
a	O
way	O
of	O
identifying	O
a	O
child	B-Data_Structure
node	I-Data_Structure
,	O
and	O
the	O
bounding	B-Algorithm
box	I-Algorithm
of	O
all	O
entries	O
within	O
this	O
child	B-Data_Structure
node	I-Data_Structure
.	O
</s>
<s>
Leaf	B-Data_Structure
nodes	I-Data_Structure
store	O
the	O
data	O
required	O
for	O
each	O
child	O
,	O
often	O
a	O
point	O
or	O
bounding	B-Algorithm
box	I-Algorithm
representing	O
the	O
child	O
and	O
an	O
external	O
identifier	O
for	O
the	O
child	O
.	O
</s>
<s>
For	O
polygon	B-General_Concept
data	O
(	O
that	O
often	O
requires	O
the	O
storage	O
of	O
large	O
polygons	B-General_Concept
)	O
the	O
common	O
setup	O
is	O
to	O
store	O
only	O
the	O
MBR	O
(	O
minimum	B-Algorithm
bounding	I-Algorithm
rectangle	I-Algorithm
)	O
of	O
the	O
polygon	B-General_Concept
along	O
with	O
a	O
unique	O
identifier	O
in	O
the	O
tree	O
.	O
</s>
<s>
In	O
range	B-Data_Structure
searching	I-Data_Structure
,	O
the	O
input	O
is	O
a	O
search	O
rectangle	O
(	O
Query	O
box	O
)	O
.	O
</s>
<s>
The	O
search	O
starts	O
from	O
the	O
root	B-Application
node	I-Application
of	O
the	O
tree	O
.	O
</s>
<s>
Every	O
internal	O
node	O
contains	O
a	O
set	O
of	O
rectangles	O
and	O
pointers	O
to	O
the	O
corresponding	O
child	B-Data_Structure
node	I-Data_Structure
and	O
every	O
leaf	B-Data_Structure
node	I-Data_Structure
contains	O
the	O
rectangles	O
of	O
spatial	O
objects	O
(	O
the	O
pointer	O
to	O
some	O
spatial	O
object	O
can	O
be	O
there	O
)	O
.	O
</s>
<s>
If	O
yes	O
,	O
the	O
corresponding	O
child	B-Data_Structure
node	I-Data_Structure
has	O
to	O
be	O
searched	O
also	O
.	O
</s>
<s>
When	O
a	O
leaf	B-Data_Structure
node	I-Data_Structure
is	O
reached	O
,	O
the	O
contained	O
bounding	B-Algorithm
boxes	I-Algorithm
(	O
rectangles	O
)	O
are	O
tested	O
against	O
the	O
search	O
rectangle	O
and	O
their	O
objects	O
(	O
if	O
there	O
are	O
any	O
)	O
are	O
put	O
into	O
the	O
result	O
set	O
if	O
they	O
lie	O
within	O
the	O
search	O
rectangle	O
.	O
</s>
<s>
For	O
priority	O
search	O
such	O
as	O
nearest	B-Algorithm
neighbor	I-Algorithm
search	I-Algorithm
,	O
the	O
query	O
consists	O
of	O
a	O
point	O
or	O
rectangle	O
.	O
</s>
<s>
The	O
root	B-Application
node	I-Application
is	O
inserted	O
into	O
the	O
priority	O
queue	O
.	O
</s>
<s>
To	O
insert	O
an	O
object	O
,	O
the	O
tree	O
is	O
traversed	O
recursively	O
from	O
the	O
root	B-Application
node	I-Application
.	O
</s>
<s>
The	O
search	O
then	O
descends	O
into	O
this	O
page	O
,	O
until	O
reaching	O
a	O
leaf	B-Data_Structure
node	I-Data_Structure
.	O
</s>
<s>
If	O
the	O
leaf	B-Data_Structure
node	I-Data_Structure
is	O
full	O
,	O
it	O
must	O
be	O
split	O
before	O
the	O
insertion	O
is	O
made	O
.	O
</s>
<s>
Adding	O
the	O
newly	O
created	O
node	O
to	O
the	O
previous	O
level	O
,	O
this	O
level	O
can	O
again	O
overflow	O
,	O
and	O
these	O
overflows	O
can	O
propagate	O
up	O
to	O
the	O
root	B-Application
node	I-Application
;	O
when	O
this	O
node	O
also	O
overflows	O
,	O
a	O
new	O
root	B-Application
node	I-Application
is	O
created	O
and	O
the	O
tree	O
has	O
increased	O
in	O
height	O
.	O
</s>
<s>
The	O
algorithm	O
needs	O
to	O
decide	O
in	O
which	O
subtree	B-Application
to	O
insert	O
.	O
</s>
<s>
The	O
objects	O
are	O
inserted	O
into	O
the	O
subtree	B-Application
that	O
needs	O
the	O
least	O
enlargement	O
.	O
</s>
<s>
What	O
happens	O
next	O
is	O
it	O
tries	O
to	O
minimize	O
the	O
overlap	O
(	O
in	O
case	O
of	O
ties	O
,	O
prefer	O
least	O
enlargement	O
and	O
then	O
least	O
area	O
)	O
;	O
at	O
the	O
higher	O
levels	O
,	O
it	O
behaves	O
similar	O
to	O
the	O
R-tree	B-Library
,	O
but	O
on	O
ties	O
again	O
preferring	O
the	O
subtree	B-Application
with	O
smaller	O
area	O
.	O
</s>
<s>
The	O
decreased	O
overlap	O
of	O
rectangles	O
in	O
the	O
R*	B-Data_Structure
-tree	I-Data_Structure
is	O
one	O
of	O
the	O
key	O
benefits	O
over	O
the	O
traditional	O
R-tree	B-Library
.	O
</s>
<s>
Finally	O
,	O
the	O
X-tree	B-Data_Structure
can	O
be	O
seen	O
as	O
a	O
R*	B-Data_Structure
-tree	I-Data_Structure
variant	O
that	O
can	O
also	O
decide	O
to	O
not	O
split	O
a	O
node	O
,	O
but	O
construct	O
a	O
so-called	O
super-node	O
containing	O
all	O
the	O
extra	O
entries	O
,	O
when	O
it	O
does	O
n't	O
find	O
a	O
good	O
split	O
(	O
in	O
particular	O
for	O
high-dimensional	O
data	O
)	O
.	O
</s>
<s>
Deleting	O
an	O
entry	O
from	O
a	O
page	O
may	O
require	O
updating	O
the	O
bounding	B-Algorithm
rectangles	I-Algorithm
of	O
parent	O
pages	O
.	O
</s>
<s>
Instead	O
,	O
the	O
page	O
will	O
be	O
dissolved	O
and	O
all	O
its	O
children	O
(	O
which	O
may	O
be	O
subtrees	B-Application
,	O
not	O
only	O
leaf	B-Application
objects	I-Application
)	O
will	O
be	O
reinserted	O
.	O
</s>
<s>
If	O
during	O
this	O
process	O
the	O
root	B-Application
node	I-Application
has	O
a	O
single	O
element	O
,	O
the	O
tree	O
height	O
can	O
decrease	O
.	O
</s>
<s>
Packed	O
Hilbert	B-Data_Structure
R-tree	I-Data_Structure
:	O
variation	O
of	O
Nearest-X	O
,	O
but	O
sorting	O
using	O
the	O
Hilbert	O
value	O
of	O
the	O
center	O
of	O
a	O
rectangle	O
instead	O
of	O
using	O
the	O
X	O
coordinate	O
.	O
</s>
<s>
For	O
point	O
data	O
,	O
the	O
leaf	B-Data_Structure
nodes	I-Data_Structure
will	O
not	O
overlap	O
,	O
and	O
"	O
tile	O
"	O
the	O
data	O
space	O
into	O
approximately	O
equal	O
sized	O
pages	O
.	O
</s>
