<s>
Hilbert	B-Data_Structure
R-tree	I-Data_Structure
,	O
an	O
R-tree	B-Library
variant	O
,	O
is	O
an	O
index	O
for	O
multidimensional	O
objects	O
such	O
as	O
lines	O
,	O
regions	O
,	O
3-D	O
objects	O
,	O
or	O
high-dimensional	O
feature-based	O
parametric	O
objects	O
.	O
</s>
<s>
The	O
performance	O
of	O
R-trees	B-Library
depends	O
on	O
the	O
quality	O
of	O
the	O
algorithm	O
that	O
clusters	O
the	O
data	O
rectangles	O
on	O
a	O
node	O
.	O
</s>
<s>
Hilbert	B-Data_Structure
R-trees	I-Data_Structure
use	O
space-filling	B-Algorithm
curves	I-Algorithm
,	O
and	O
specifically	O
the	O
Hilbert	B-Algorithm
curve	I-Algorithm
,	O
to	O
impose	O
a	O
linear	O
ordering	O
on	O
the	O
data	O
rectangles	O
.	O
</s>
<s>
There	O
are	O
two	O
types	O
of	O
Hilbert	B-Data_Structure
R-trees	I-Data_Structure
:	O
one	O
for	O
static	O
databases	O
,	O
and	O
one	O
for	O
dynamic	O
databases	O
.	O
</s>
<s>
In	O
both	O
cases	O
Hilbert	O
space-filling	B-Algorithm
curves	I-Algorithm
are	O
used	O
to	O
achieve	O
better	O
ordering	O
of	O
multidimensional	O
objects	O
in	O
the	O
node	O
.	O
</s>
<s>
This	O
ordering	O
has	O
to	O
be	O
"	O
good	O
"	O
,	O
in	O
the	O
sense	O
that	O
it	O
should	O
group	O
"	O
similar	O
"	O
data	O
rectangles	O
together	O
,	O
to	O
minimize	O
the	O
area	O
and	O
perimeter	O
of	O
the	O
resulting	O
minimum	B-Algorithm
bounding	I-Algorithm
rectangles	I-Algorithm
(	O
MBRs	O
)	O
.	O
</s>
<s>
Packed	O
Hilbert	B-Data_Structure
R-trees	I-Data_Structure
are	O
suitable	O
for	O
static	O
databases	O
in	O
which	O
updates	O
are	O
very	O
rare	O
or	O
in	O
which	O
there	O
are	O
no	O
updates	O
at	O
all	O
.	O
</s>
<s>
The	O
dynamic	O
Hilbert	B-Data_Structure
R-tree	I-Data_Structure
is	O
suitable	O
for	O
dynamic	O
databases	O
where	O
insertions	O
,	O
deletions	O
,	O
or	O
updates	O
may	O
occur	O
in	O
real	O
time	O
.	O
</s>
<s>
Moreover	O
,	O
dynamic	O
Hilbert	B-Data_Structure
R-trees	I-Data_Structure
employ	O
flexible	O
deferred	O
splitting	O
mechanism	O
to	O
increase	O
the	O
space	O
utilization	O
.	O
</s>
<s>
This	O
is	O
done	O
by	O
proposing	O
an	O
ordering	O
on	O
the	O
R-tree	B-Library
nodes	O
.	O
</s>
<s>
The	O
Hilbert	B-Data_Structure
R-tree	I-Data_Structure
sorts	O
rectangles	O
according	O
to	O
the	O
Hilbert	O
value	O
of	O
the	O
center	O
of	O
the	O
rectangles	O
(	O
i.e.	O
,	O
MBR	O
)	O
.	O
</s>
<s>
(	O
The	O
Hilbert	O
value	O
of	O
a	O
point	O
is	O
the	O
length	O
of	O
the	O
Hilbert	B-Algorithm
curve	I-Algorithm
from	O
the	O
origin	O
to	O
the	O
point	O
.	O
)	O
</s>
<s>
By	O
adjusting	O
the	O
split	O
policy	O
,	O
the	O
Hilbert	B-Data_Structure
R-tree	I-Data_Structure
can	O
achieve	O
a	O
degree	O
of	O
space	O
utilization	O
as	O
high	O
as	O
desired	O
.	O
</s>
<s>
To	O
the	O
contrary	O
,	O
other	O
R-tree	B-Library
variants	O
have	O
no	O
control	O
over	O
the	O
space	O
utilization	O
.	O
</s>
<s>
Although	O
the	O
following	O
example	O
is	O
for	O
a	O
static	O
environment	O
,	O
it	O
explains	O
the	O
intuitive	O
principles	O
for	O
good	O
R-tree	B-Library
design	O
.	O
</s>
<s>
Roussopoulos	O
and	O
Leifker	O
proposed	O
a	O
method	O
for	O
building	O
a	O
packed	O
R-tree	B-Library
that	O
achieves	O
almost	O
100%	O
space	O
utilization	O
.	O
</s>
<s>
In	O
this	O
discussion	O
points	O
or	O
rectangles	O
are	O
sorted	O
on	O
the	O
x	O
coordinate	O
of	O
the	O
lower	O
left	O
corner	O
of	O
the	O
rectangle	O
,	O
referred	O
to	O
as	O
a	O
"	O
lowx	O
packed	O
R-tree	B-Library
"	O
.	O
</s>
<s>
The	O
sorted	O
list	O
of	O
rectangles	O
is	O
scanned	O
;	O
successive	O
rectangles	O
are	O
assigned	O
to	O
the	O
same	O
R-tree	B-Library
leaf	O
node	O
until	O
that	O
node	O
is	O
full	O
;	O
a	O
new	O
leaf	O
node	O
is	O
then	O
created	O
,	O
and	O
the	O
scanning	O
of	O
the	O
sorted	O
list	O
continues	O
.	O
</s>
<s>
Thus	O
,	O
the	O
nodes	O
of	O
the	O
resulting	O
R-tree	B-Library
will	O
be	O
fully	O
packed	O
,	O
with	O
the	O
possible	O
exception	O
of	O
the	O
last	O
node	O
at	O
each	O
level	O
.	O
</s>
<s>
Figure	O
1	O
highlights	O
the	O
problem	O
of	O
the	O
lowx	O
packed	O
R-tree	B-Library
.	O
</s>
<s>
Figure	O
1	O
 [ Right ] 	O
shows	O
the	O
leaf	O
nodes	O
of	O
the	O
R-tree	B-Library
that	O
the	O
lowx	O
packing	O
method	O
will	O
create	O
for	O
the	O
points	O
of	O
Figure	O
1	O
 [ Left ] 	O
.	O
</s>
<s>
The	O
fact	O
that	O
the	O
resulting	O
father	O
nodes	O
cover	O
little	O
area	O
explains	O
why	O
the	O
lowx	O
packed	O
R-tree	B-Library
achieves	O
excellent	O
performance	O
for	O
point	O
queries	O
.	O
</s>
<s>
This	O
is	O
consistent	O
with	O
the	O
analytical	O
formulas	O
for	O
R-tree	B-Library
performance	O
.	O
</s>
<s>
Ignorance	O
of	O
the	O
y	O
coordinate	O
by	O
the	O
lowx	O
packed	O
R-tree	B-Library
tends	O
to	O
violate	O
this	O
empirical	O
rule	O
.	O
</s>
<s>
The	O
section	O
below	O
describes	O
two	O
variants	O
of	O
the	O
Hilbert	B-Data_Structure
R-trees	I-Data_Structure
.	O
</s>
<s>
The	O
nodes	O
of	O
the	O
resulting	O
R-tree	B-Library
will	O
be	O
fully	O
packed	O
,	O
with	O
the	O
possible	O
exception	O
of	O
the	O
last	O
node	O
at	O
each	O
level	O
.	O
</s>
<s>
Thus	O
,	O
the	O
space	O
utilization	O
is	O
≈100%	O
;	O
this	O
structure	O
is	O
called	O
a	O
packed	O
Hilbert	B-Data_Structure
R-tree	I-Data_Structure
.	O
</s>
<s>
The	O
second	O
index	O
,	O
called	O
a	O
Dynamic	O
Hilbert	B-Data_Structure
R-tree	I-Data_Structure
,	O
supports	O
insertions	O
and	O
deletions	O
,	O
and	O
is	O
suitable	O
for	O
a	O
dynamic	O
environment	O
.	O
</s>
<s>
The	O
following	O
provides	O
a	O
brief	O
introduction	O
to	O
the	O
Hilbert	B-Algorithm
curve	I-Algorithm
.	O
</s>
<s>
The	O
basic	O
Hilbert	B-Algorithm
curve	I-Algorithm
on	O
a	O
2x2	O
grid	O
,	O
denoted	O
by	O
H1	O
is	O
shown	O
in	O
Figure	O
2	O
.	O
</s>
<s>
Figure	O
2	O
also	O
shows	O
the	O
Hilbert	B-Algorithm
curves	I-Algorithm
of	O
order	O
two	O
and	O
three	O
.	O
</s>
<s>
When	O
the	O
order	O
of	O
the	O
curve	O
tends	O
to	O
infinity	O
,	O
like	O
other	O
space	B-Algorithm
filling	I-Algorithm
curves	I-Algorithm
,	O
the	O
resulting	O
curve	O
is	O
a	O
fractal	O
,	O
with	O
a	O
fractal	O
dimension	O
of	O
two	O
.	O
</s>
<s>
The	O
Hilbert	B-Algorithm
curve	I-Algorithm
can	O
be	O
generalized	O
for	O
higher	O
dimensionalities	O
.	O
</s>
<s>
The	O
path	O
of	O
a	O
space	B-Algorithm
filling	I-Algorithm
curve	I-Algorithm
imposes	O
a	O
linear	O
ordering	O
on	O
the	O
grid	O
points	O
;	O
this	O
path	O
may	O
be	O
calculated	O
by	O
starting	O
at	O
one	O
end	O
of	O
the	O
curve	O
and	O
following	O
the	O
path	O
to	O
the	O
other	O
end	O
.	O
</s>
<s>
However	O
,	O
for	O
the	O
Hilbert	B-Algorithm
curve	I-Algorithm
this	O
is	O
much	O
harder	O
than	O
for	O
example	O
the	O
Z-order	B-Algorithm
curve	I-Algorithm
.	O
</s>
<s>
The	O
Hilbert	B-Algorithm
curve	I-Algorithm
imposes	O
a	O
linear	O
ordering	O
on	O
the	O
data	O
rectangles	O
and	O
then	O
traverses	O
the	O
sorted	O
list	O
,	O
assigning	O
each	O
set	O
of	O
C	O
rectangles	O
to	O
a	O
node	O
in	O
the	O
R-tree	B-Library
.	O
</s>
<s>
The	O
final	O
result	O
is	O
that	O
the	O
set	O
of	O
data	O
rectangles	O
on	O
the	O
same	O
node	O
will	O
be	O
close	O
to	O
each	O
other	O
in	O
the	O
linear	O
ordering	O
,	O
and	O
most	O
likely	O
in	O
the	O
native	O
space	O
;	O
thus	O
,	O
the	O
resulting	O
R-tree	B-Library
nodes	O
will	O
have	O
smaller	O
areas	O
.	O
</s>
<s>
By	O
grouping	O
the	O
points	O
according	O
to	O
their	O
Hilbert	O
values	O
,	O
the	O
MBRs	O
of	O
the	O
resulting	O
R-tree	B-Library
nodes	O
tend	O
to	O
be	O
small	O
square-like	O
rectangles	O
.	O
</s>
<s>
This	O
is	O
a	O
simple	O
heuristic	O
for	O
constructing	O
an	O
R-tree	B-Library
with	O
~	O
100%	O
space	O
utilization	O
which	O
at	O
the	O
same	O
time	O
will	O
have	O
a	O
good	O
response	O
time	O
.	O
</s>
<s>
The	O
performance	O
of	O
R-trees	B-Library
depends	O
on	O
the	O
quality	O
of	O
the	O
algorithm	O
that	O
clusters	O
the	O
data	O
rectangles	O
on	O
a	O
node	O
.	O
</s>
<s>
Hilbert	B-Data_Structure
R-trees	I-Data_Structure
use	O
space-filling	B-Algorithm
curves	I-Algorithm
,	O
and	O
specifically	O
the	O
Hilbert	B-Algorithm
curve	I-Algorithm
,	O
to	O
impose	O
a	O
linear	O
ordering	O
on	O
the	O
data	O
rectangles	O
.	O
</s>
<s>
The	O
Hilbert	B-Data_Structure
R-tree	I-Data_Structure
has	O
the	O
following	O
structure	O
.	O
</s>
<s>
The	O
main	O
difference	O
between	O
the	O
Hilbert	B-Data_Structure
R-tree	I-Data_Structure
and	O
the	O
R*	O
-tree	O
is	O
that	O
non-leaf	O
nodes	O
also	O
contain	O
information	O
about	O
the	O
LHVs	O
(	O
Largest	O
Hilbert	O
Value	O
)	O
.	O
</s>
<s>
Thus	O
,	O
a	O
non-leaf	O
node	O
in	O
the	O
Hilbert	B-Data_Structure
R-tree	I-Data_Structure
contains	O
at	O
most	O
Cn	O
entries	O
of	O
the	O
form	O
(	O
R	O
,	O
ptr	O
,	O
LHV	O
)	O
where	O
Cn	O
is	O
the	O
capacity	O
of	O
a	O
non-leaf	O
node	O
,	O
R	O
is	O
the	O
MBR	O
that	O
encloses	O
all	O
the	O
children	O
of	O
that	O
node	O
,	O
ptr	O
is	O
a	O
pointer	O
to	O
the	O
child	O
node	O
,	O
and	O
LHV	O
is	O
the	O
largest	O
Hilbert	O
value	O
among	O
the	O
data	O
rectangles	O
enclosed	O
by	O
R	O
.	O
Notice	O
that	O
since	O
the	O
non-leaf	O
node	O
picks	O
one	O
of	O
the	O
Hilbert	O
values	O
of	O
the	O
children	O
to	O
be	O
the	O
value	O
of	O
its	O
own	O
LHV	O
,	O
there	O
is	O
not	O
extra	O
cost	O
for	O
calculating	O
the	O
Hilbert	O
values	O
of	O
the	O
MBR	O
of	O
non-leaf	O
nodes	O
.	O
</s>
<s>
Figure	O
3	O
illustrates	O
some	O
rectangles	O
organized	O
in	O
a	O
Hilbert	B-Data_Structure
R-tree	I-Data_Structure
.	O
</s>
<s>
A	O
plain	O
R-tree	B-Library
splits	O
a	O
node	O
on	O
overflow	O
,	O
creating	O
two	O
nodes	O
from	O
the	O
original	O
one	O
.	O
</s>
<s>
The	O
searching	O
algorithm	O
is	O
similar	O
to	O
the	O
one	O
used	O
in	O
other	O
R-tree	B-Library
variants	O
.	O
</s>
<s>
To	O
insert	O
a	O
new	O
rectangle	O
r	O
in	O
the	O
Hilbert	B-Data_Structure
R-tree	I-Data_Structure
,	O
the	O
Hilbert	O
value	O
h	O
of	O
the	O
center	O
of	O
the	O
new	O
rectangle	O
is	O
used	O
as	O
a	O
key	O
.	O
</s>
<s>
/	O
*	O
Inserts	O
a	O
new	O
rectangle	O
r	O
in	O
the	O
Hilbert	B-Data_Structure
R-tree	I-Data_Structure
.	O
</s>
<s>
In	O
the	O
Hilbert	B-Data_Structure
R-tree	I-Data_Structure
,	O
there	O
is	O
no	O
need	O
to	O
re-insert	O
orphaned	O
nodes	O
whenever	O
a	O
father	O
node	O
underflows	O
.	O
</s>
<s>
This	O
is	O
possible	O
because	O
the	O
nodes	O
have	O
a	O
clear	O
ordering	O
(	O
according	O
to	O
Largest	O
Hilbert	O
Value	O
,	O
LHV	O
)	O
;	O
in	O
contrast	O
,	O
in	O
R-trees	B-Library
there	O
is	O
no	O
such	O
concept	O
concerning	O
sibling	O
nodes	O
.	O
</s>
<s>
The	O
overflow	O
handling	O
algorithm	O
in	O
the	O
Hilbert	B-Data_Structure
R-tree	I-Data_Structure
treats	O
the	O
overflowing	O
nodes	O
either	O
by	O
moving	O
some	O
of	O
the	O
entries	O
to	O
one	O
of	O
the	O
s	O
-	O
1	O
cooperating	O
siblings	O
or	O
by	O
splitting	O
s	O
nodes	O
into	O
s	O
+1	O
nodes	O
.	O
</s>
