Presentation is loading. Please wait.

Presentation is loading. Please wait.

Spatial Indexing SAMs. Spatial Access Methods PAMs Grid File kd-tree based (LSD-, hB- trees) Z-ordering + B+-tree R-tree Variations: R*-tree, Hilbert.

Similar presentations


Presentation on theme: "Spatial Indexing SAMs. Spatial Access Methods PAMs Grid File kd-tree based (LSD-, hB- trees) Z-ordering + B+-tree R-tree Variations: R*-tree, Hilbert."— Presentation transcript:

1 Spatial Indexing SAMs

2 Spatial Access Methods PAMs Grid File kd-tree based (LSD-, hB- trees) Z-ordering + B+-tree R-tree Variations: R*-tree, Hilbert R-tree

3 R-tree A B C D E F G H I J P1 P2 P3 P4 P1P2P3P4 FGDEHIJABC Multi-way external memory structure, indexes MBRs Dynamic structure

4 R-tree: properties Main points: every parent node completely covers its ‘children’ a child MBR may be covered by more than one parent - it is stored under ONLY ONE of them. (ie., no need for dup. elim.) a point query may follow multiple branches.

5 R-tree The original R-tree tries to minimize the area of each enclosing rectangle in the index nodes. Is there any other property that can be optimized? R*-tree  Yes!

6 R*-tree Optimization Criteria: (O1) Area covered by an index MBR (O2) Overlap between directory MBRs (O3) Margin of a directory rectangle (O4) Storage utilization Sometimes it is impossible to optimize all the above criteria at the same time!

7 R*-tree ChooseSubtree: If next node is a leaf node, choose the node using the following criteria: Least overlap enlargement Least area enlargement Smaller area Else Least area enlargement Smaller area

8 R*-tree SplitNode Choose the axis to split Choose the two groups along the chosen axis ChooseSplitAxis Along each axis, sort rectangles and break them into two groups (M-2m+2 possible ways where one group contains at least m rectangles). Compute the sum S of all margin-values (perimeters) of each pair of groups. Choose the one that minimizes S ChooseSplitIndex Along the chosen axis, choose the grouping that gives the minimum overlap-value

9 R*-tree Forced Reinsert: defer splits, by forced-reinsert, i.e.: instead of splitting, temporarily delete some entries, shrink overflowing MBR, and re- insert those entries Which ones to re-insert? How many? A: 30%

10 R-tree: variations What about static datasets? (no ins/del) Hilbert What about other bounding shapes?

11 R-trees - variations what about static datasets (no ins/del/upd)? Q: Best way to pack points?

12 R-trees - variations what about static datasets (no ins/del/upd)? Q: Best way to pack points? A1: plane-sweep great for queries on ‘x’; terrible for ‘y’

13 R-trees - variations what about static datasets (no ins/del/upd)? Q: Best way to pack points? A1: plane-sweep great for queries on ‘x’; bad for ‘y’

14 R-trees - variations what about static datasets (no ins/del/upd)? Q: Best way to pack points? A1: plane-sweep great for queries on ‘x’; terrible for ‘y’ Q: how to improve?

15 R-trees - variations A: plane-sweep on HILBERT curve!

16 R-trees - variations A: plane-sweep on HILBERT curve! In fact, it can be made dynamic (how?), as well as to handle regions (how?)

17 R-trees - variations Dynamic (‘Hilbert R- tree): each point has an ‘h’- value (hilbert value) insertions: like a B-tree on the h-value but also store MBR, for searches

18 Hilbert R-tree Data structure of a node? LHV x-low, ylow x-high, y-high ptr h-value >= LHV & MBRs: inside parent MBR

19 R-trees - variations Data structure of a node? LHV x-low, ylow x-high, y-high ptr h-value >= LHV & MBRs: inside parent MBR ~B-tree

20 R-trees - variations Data structure of a node? LHV x-low, ylow x-high, y-high ptr h-value >= LHV & MBRs: inside parent MBR ~ R-tree


Download ppt "Spatial Indexing SAMs. Spatial Access Methods PAMs Grid File kd-tree based (LSD-, hB- trees) Z-ordering + B+-tree R-tree Variations: R*-tree, Hilbert."

Similar presentations


Ads by Google