RTrees: A Dynamic Index Structure For Spatial Searching - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

RTrees: A Dynamic Index Structure For Spatial Searching

Description:

... node has the smallest rectangle that spatially contains the ... Find all objects whose rectangles are overlapped with a search rectangle S. S. R1. R3 ... – PowerPoint PPT presentation

Number of Views:73
Avg rating:3.0/5.0
Slides: 29
Provided by: one121
Category:

less

Transcript and Presenter's Notes

Title: RTrees: A Dynamic Index Structure For Spatial Searching


1
R-Trees A Dynamic Index Structure For Spatial
Searching
CSED700 - Advanced Topics in Data Management
  • Antonin Guttman
  • Presented by Gae-won You

2
Introduction
  • R-Tree
  • A multi-dimensional index structure
  • A height balanced tree like the B-Tree
  • Used widely in spatial and multimedia databases

3
R-Tree Structure
M maximum number of entries m minimum number
of entries ( M/2)
R2
R1
  • Every leaf node contains between m and M index
    records unless it is the root.
  • Each leaf node has the smallest rectangle that
    spatially contains the n-dimensional data
    objects.
  • Every non-leaf node has between m and M children
    unless it is the root.
  • Each non-leaf node has the smallest rectangle
    that spatially contains the rectangles in the
    child node.
  • The root node has at least two children unless
    it is a leaf.
  • All leaves appear on the same level.

R3
A
B
ltMBR, Pointer to a child nodegt
ltMBR, Pointer to a spatial objectgt
4
Search and Update
  • Search
  • Update
  • Insertion
  • Deletion
  • Node Split (with Insertion)
  • A Quadratic-Cost Algorithm
  • A Linear-Cost Algorithm

5
Search and Update
  • Search
  • Update
  • Insertion
  • Deletion
  • Node Split (with Insertion)
  • A Quadratic-Cost Algorithm
  • A Linear-Cost Algorithm

6
R-Tree Search (1/7)
R2
Find all objects whose rectangles are overlapped
with a search rectangle S
R1
R3
A
B
S
7
R-Tree Search (2/7)
R2
R1
R3
A
B
S
8
R-Tree Search (3/7)
R2
R1
R3
A
B
S
9
R-Tree Search (4/7)
R2
R1
R3
A
B
S
10
R-Tree Search (5/7)
R2
R1
R3
A
B
S
11
R-Tree Search (6/7)
R2
R1
R3
A
B
S
12
R-Tree Search (7/7)

R1
R3
A
B
S
B and D ? overlapped objects with S
13
Search and Update
  • Search
  • Update
  • Insertion
  • Deletion
  • Node Split (with Insertion)
  • A Quadratic-Cost Algorithm
  • A Linear-Cost Algorithm

14
R-Tree Insertion (1/7)
R2
Insert a new spatial object X
R1
R3
A
B
X
15
R-Tree Insertion (2/7)
R2
Find the proper child node - least enlargement
- smallest MBR if child nodes contains a
new object
R1
R3
A
B
X
16
R-Tree Insertion (3/7)
R2
R1
R3
A
B
X
17
R-Tree Insertion (4/7)
A
B
X
18
R-Tree Insertion (5/7)
R2
R1
R3
A
B
R4
X
E
D
F
19
R-Tree Insertion (6/7)
A
B
X
20
R-Tree Insertion (7/7)
Empty Spot
21
Search and Update
  • Search
  • Update
  • Insertion
  • Deletion
  • Node Split (with Insertion)
  • A Quadratic-Cost Algorithm
  • A Linear-Cost Algorithm

22
R-Tree Deletion
  • Performed unlike a B-Tree deletion
  • eliminate the node if it has too few entries (
    m)
  • propagate node elimination upward as necessary
  • re-insert its entries using insertion method
  • re-insertion
  • (1) easier to implement
  • (2) prevent gradual deterioration

23
Search and Update
  • Search
  • Update
  • Insertion
  • Deletion
  • Node Split (with Insertion)
  • A Quadratic-Cost Algorithm
  • A Linear-Cost Algorithm

24
Split with insertion

Y
R4
R4
?
E
F
D
Y
25
Split
  • The bad split may cause multiple paths for
    searching

A
A
VS.
B
B
E
E
F
F
? Minimize the total area of the two covering
rectangles
26
Quadratic split
  • Divide S into S1 and S2
  • Initial step choose two candidates
  • Choose max MBR(a,b) area(a) area(b) for
    all a, b
  • Iteration step
  • Choose max MBR(S1, a) - MBR(S2, a) for
    the remaining entry a
  • Add to the group whose covering rectangle will
    have to be enlarged least

A
B
E
F
27
Conclusion
  • R-tree index structure
  • 3 operations
  • Search
  • Insertion ( with split )
  • Deletion

28
Q A
Write a Comment
User Comments (0)
About PowerShow.com