RTree Example - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

RTree Example

Description:

(1,2): 16-4-5 = 7 (1,3): 27-4-9 = 14 (5,3): 36-3-9 = 24. PickNext. Find max area of ... an entry to the root and redistribute the nodes with the ... – PowerPoint PPT presentation

Number of Views:605
Avg rating:3.0/5.0
Slides: 8
Provided by: compaq190
Category:

less

Transcript and Presenter's Notes

Title: RTree Example


1
R-Tree Example
2
R-Tree Split
PickSeeds Find max area of (bbox(rect1,
rect2)-rect1-rect2) (1,2) 16-4-5 7 (1,3)
27-4-9 14 (5,3) 36-3-9 24 PickNext Find
max area of increase to bbox at node (5)-
increase to bbox at node (3) Add 1
(20-3)-(27-9) 1 Add 2 (25-3)-(18-9)
13 Add 4 (12-3)-(16-9) 2 Distribute Find min
(increase to bbox at node (5), increase to bbox
at node (3)) Add 2 to node (5) 25-3 22 Add 2
to node(3) 18-9 9 Repeat for remaining entries
m2 M4
R1
R2
5
4
3
2
1
  • Given rectangles 1-5, how do we build an R-Tree?
  • Pick the two rectangles whose bounding box will
    waste the most area.
  • Pick the next entry with greatest preference for
    one group.
  • Add entries to the distribution based on the
    minimal increase to the bounding box.

3
R-Tree Insertion
ChooseLeaf Insert 6 To node (5,4)
(4x3)-(6x4) 12 To node (3,2,1) (3x9)-(8x9)
45 Insert 7 To node (6,5,4) (6x4)-(8x7)32 T
o node (3,2,1) (3x9)-(8x9)45
m2 M4
R1
R2
7
3
2
1
6
5
4
We insert new nodes in a similar fashion (based
on minimum area increase to the bounding box)
until the leaf is full.
4
R-Tree Insertion (cont.)
ChooseLeaf Insert 8 -We determine that 8
needs to be added to node (7,6,5,4) -Call Split
on (8,7,6,5,4) to determine distribution (7,6,8)
(5,4) -Call AdjustTree to adjust the bounding
box size of R1 and add entry R2
m2 M4
R1
R2
R3
7
6
3
8
2
1
5
4
If a new node needs to be added to a full leaf,
then add an entry to the root and redistribute
the nodes with the new leaf node added to the
current leaf level.
5
R-Tree Split
ChooseSplitAxis x-axis min) 1,2 5,4,3
82 66 22 1,2,5 4,3 86
44 20 max)1,5 4,2,3 64
64 20 1,5,4 2,3 66
36 21 y-axis min) 5,4 3,2,1 43
93 19 5,4,3 2,1 66
82 22 max)5,4 3,2,1 43
39 19 5,4,2 1,3 55 92 21
m2 M4
R1
R2
?
?
Given rectangles 1-5, how do we build an
R-Tree? 1) Sort rectangles in increasing order
by their min and max values for both the x and y
axis. 2) Choose the axis with the minimum sum of
bounding boxes ?y-axis.
6
R-Tree Split (cont.)
y-axis distributions overlap value 5,4
3,2,1 3 5,4,3 2,1 10 5,4,2 1,3
10
m2 M4
R1
R2
5
4
3
2
1
Along the chosen axis (y-axis), choose the
distribution with minimum overlap value. Resolve
ties with minimum area value.
7
R-Tree Insertion
ChooseSubTree Insert 6 To node (5,4)
(4x3)-(6x4) 12 To node (3,2,1) (3x9)-(8x9)
45 Insert 7 To node (6,5,4) (6x4)-(8x7)32 T
o node (3,2,1) (3x9)-(8x9)45
m2 M4
R1
R2
7
3
2
1
6
5
4
Again, we insert new nodes based on minimum area
increase to the bounding box until the leaf is
full.
Write a Comment
User Comments (0)
About PowerShow.com