Presentation is loading. Please wait.

Presentation is loading. Please wait.

Spatial Information Systems (SIS) COMP 30110 Spatial access methods: Indexing (part 2)

Similar presentations


Presentation on theme: "Spatial Information Systems (SIS) COMP 30110 Spatial access methods: Indexing (part 2)"— Presentation transcript:

1 Spatial Information Systems (SIS) COMP 30110 Spatial access methods: Indexing (part 2)

2 Quadtree-based indexes Adaptation of original quadtree structure defined for imagesAdaptation of original quadtree structure defined for images Represented by a quaternary treeRepresented by a quaternary tree Different types of quadtree-based indexes:Different types of quadtree-based indexes: For 2D polygonal data: based on MBRsFor 2D polygonal data: based on MBRs For straight-line data and 1D map data (PM- quadtrees and PMR-quadtrees)For straight-line data and 1D map data (PM- quadtrees and PMR-quadtrees) For point dataFor point data

3 Quadtree-based indexes (cont.d) Space-based hierarchical structuresSpace-based hierarchical structures Based on a recursive subdivision of the space into 4 quadrantsBased on a recursive subdivision of the space into 4 quadrants The subdivision can be into either equal sized or unequal sized quadtrantsThe subdivision can be into either equal sized or unequal sized quadtrants

4 Quadtrees for polygonal data Used to index the MBRs of objects and not the actual geometries (like R-trees)Used to index the MBRs of objects and not the actual geometries (like R-trees) The space is recursively subdivided until the number of rectangles overlapping each quadrant is less than the disk page capacityThe space is recursively subdivided until the number of rectangles overlapping each quadrant is less than the disk page capacity Each leaf is associated with a disk page that stores the entriesEach leaf is associated with a disk page that stores the entries A rectangle appears in all leaf quadrants that it overlaps (difference wrt R-trees)A rectangle appears in all leaf quadrants that it overlaps (difference wrt R-trees)

5 Example Quadree with disk page capacity of 4 entries A B C D E F G I J H K L [A,B,F][B,C,F][F,G] [F] [D,E,J][G,H,I,L] Pointers to object geometries [H,J,K]

6 Example: point query Follow a single path from root to leaf Follow a single path from root to leaf At each level choose among the four quadrants the one containing the point At each level choose among the four quadrants the one containing the point Once the MBR containing P is found, check for inclusion in actual geometry Once the MBR containing P is found, check for inclusion in actual geometry A B C D E F G I J H K L [A,B,F][B,C,F][F,G] [F] [D,E,J][G,H,I,L][H,J,K] P

7 Linear data: PM-quadtrees Vertex-based structures that recursively decompose the space such that at most one vertex lies in a quadtree leaf node Such a decomposition results in splitting lines into segments called q-edges A node in a PM-quadtree contains the following information: - Pointers to the 4 subquadrants of the node (NW, NE, SW, SE) - List of q-edges crossing the region of space corresponding to the node - Pointers to the lines that each q-edge is part of

8 PM-quadtrees (cont.d) Several different variation of PM-quadtrees Examples: 1.PM 1 -quadtree imposes the following restrictions: - If a leaf node contains a vertex, all segments contained in the node must be incident on that vertex - If a leaf node does not contain a vertex, it cannot contain more than one segment 2.PM 2 -quadtree relaxes the second condition 3.PM 3 -quadtree: no restriction

9 Examples: PM 1 -quadtree

10 Examples: PM 2 -quadtree A leaf node that does not contain a vertex can contain more than one edge

11 Examples: PM 3 -quadtree Leaf nodes containing one vertex can contain edges that are not incident at that vertex

12 Point data Two main indexing methods: -Fixed Grid (and Grid file) -Quadtree Space is subdivided into equal sized or unequal sized cells each corresponding to a disk page

13 Example: fixed grid disk page capacity = 3 entries

14 Grid file Improvement of the grid structure Cells of different size to avoid too many empty cells Depends on the order in which the points are inserted

15 Example: quadtree disk page capacity = 3 entries

16 Point quadtree The final structure depends on the order in which the points are inserted

17 Point quadtree (cont.d) Same dataset but points inserted in a different order

18 Summary Space-driven vs. Data-driven indexing Based on partitioning of the embedding 2D space into rectangular cells, independently of the object distribution. Objects are mapped to cells according to some pre-defined criterion. Example: Quadtrees Based on subdivision of the set of objects and not the embedding space. The subdivision adapts to the object distribution in the space. Example: R-trees


Download ppt "Spatial Information Systems (SIS) COMP 30110 Spatial access methods: Indexing (part 2)"

Similar presentations


Ads by Google