1 / 11

R-Trees

R-Trees. Presented By N Jaggan 2001A4A7223. Spatial Data Objects. Cover Multi-Dimensional Spaces Not Represented well by Points Examples include Maps objects like countries, Data elements like gears etc in a machine drawing etc. Why indexing?. Queries should take least possible time

max
Download Presentation

R-Trees

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. R-Trees Presented By N Jaggan 2001A4A7223

  2. Spatial Data Objects • Cover Multi-Dimensional Spaces • Not Represented well by Points • Examples include Maps objects like countries, Data elements like gears etc in a machine drawing etc.

  3. Why indexing? • Queries should take least possible time • Common Queries include: • Range Queries: An example is find all countries within 500 km from a point. These type of queries occur frequently in CAD and Geographic Info Systems.

  4. Why not traditional index Structures? • Hash Tables: Not useful as range search is required. • B-Trees: Are one dimensional whereas search space is multidimensional. • Quad Trees & k-d Trees: Do not take paging of secondary memory into account.

  5. R-Tree Index Structure • R-Tree is height balanced Tree similar to B-Tree. • Leaf Nodes contain pointers to data objects. • Insertions and Deletions are dynamic and can be done in any order. • Spatial Database contains a list of tuples.

  6. R-Tree Structure • Each tuple has a unique identifier. • Leaf nodes index records of the form (I,tuple-id). where I is the n-dimensional bounding rectangle of the spatial object. I=(I0,I1…….In) where each Ii is the extent along dimension i.

  7. R-Tree Structure • Non leaf entries are of the form (I,child pointer). I covers all rectangles of the lower node entries. Notation. M: Maximum number of entries in a node m: parameter specifying minimum number of entries in a node.

  8. Example

  9. Searching • Given R-tree with root T and find all records overlap with Search rectangle S. • If T is not leaf, check each entry E to determine whether Ei overlaps with S. • For all overlapping entries invoke search on each of them with root as node pointed by Ep. • If T is a leaf check each entry E. If it overlaps output it.

  10. Insertion • Find position for new record.Let it be L. • Start with the root and go down each level finding the rectangle which needs the least enlargement.. • If there is space in L add record to L • Otherwise split L • Propagate changes upwards -Starting from L, go up and change covering rectangles. Propagate splits upwards if there is no room. • If root is split, create a new root.

  11. Deletion • Remove index node E from R-Tree. • Find node containing record. • Remove E. • If node contains fewer than m records remove the node and add it to Q. • Move up and do the same reducing covering rectangles. • Reinsert all records in Q.

More Related