Sorting in Space and Network Distance Browsing

Size: px
Start display at page:

Download "Sorting in Space and Network Distance Browsing"

Transcription

1 Sorting in Space and Network Distance Browsing Hanan Samet hjs Department of Computer Science University of Maryland College Park, MD 20742, USA These notes may not e reproduced y any means (mechanical or electronic or any other) or posted on any we site without the express written permission of Hanan Samet Copyright c 2008 Hanan Samet SortinginSpace p./3

2

3 Why Sorting of Spatial Data is Important Most operations invarialy involve search Search is sped up y sorting the data sort - Definition: ver. to put in a certain place or rank according to kind, class, or nature 2. to arrange according to characteristics Examples. Warnock algorithm: sorting ojects for display vector: hidden-line elimination raster: hidden-surface elimination 2. Back-to-front and front-to-ack algorithms 3. BSP trees for visiility determination 4. Accelerating ray tracing and ray casting y finding ray-oject intersections 5. Bounding ox hierarchies arrange space according to whether occupied or unoccupied Copyright 2008 y Hanan Samet

4 Sorting Implies the Existence of an Ordering. Fine for one-dimensional data sort people y weight and find closest in weight to Bill and can also find closest in weight to Larry sort cities y distance from Chicago c and find closest to Chicago ut cannot find closest to New York unless a resort 2. Hard for two-dimensions as higher as notion of ordering does not exist unless a dominance relation holds point a = {a i i d} dominates point = { i i d} if a i i, i d. 3. Only solution is to linearize data as in a space-filling curve sort is explicit need implicit sort so no need to resort if reference point changes Copyright 2008 y Hanan Samet

5 Sorting Implies the Existence of an Ordering. Fine for one-dimensional data sort people y weight and find closest in weight to Bill and can also find closest in weight to Larry sort cities y distance from Chicago c and find closest to Chicago ut cannot find closest to New York unless a resort 2. Hard for two-dimensions as higher as notion of ordering does not exist unless a dominance relation holds point a = {a i i d} dominates point = { i i d} if a i i, i d. a 3. Only solution is to linearize data as in a space-filling curve sort is explicit need implicit sort so no need to resort if reference point changes Copyright 2008 y Hanan Samet

6 Sorting Implies the Existence of an Ordering. Fine for one-dimensional data sort people y weight and find closest in weight to Bill and can also find closest in weight to Larry sort cities y distance from Chicago c and find closest to Chicago ut cannot find closest to New York unless a resort 2. Hard for two-dimensions as higher as notion of ordering does not exist unless a dominance relation holds point a = {a i i d} dominates point = { i i d} if a i i, i d. a does not dominate 3. Only solution is to linearize data as in a space-filling curve sort is explicit need implicit sort so no need to resort if reference point changes Copyright 2008 y Hanan Samet

7 Sorting Implies the Existence of an Ordering. Fine for one-dimensional data sort people y weight and find closest in weight to Bill and can also find closest in weight to Larry sort cities y distance from Chicago c and find closest to Chicago ut cannot find closest to New York unless a resort 2. Hard for two-dimensions as higher as notion of ordering does not exist unless a dominance relation holds point a = {a i i d} dominates point = { i i d} if a i i, i d. a does not dominate ut dominates c 3. Only solution is to linearize data as in a space-filling curve sort is explicit need implicit sort so no need to resort if reference point changes Copyright 2008 y Hanan Samet

8 PRINCE GEORGES COUNTY hi28 Copyright 2008 y Hanan Samet 2

9 hi27 EXAMPLE QUERIES ON LINE SEGMENT DATABASES Queries aout line segments. All segments that intersect a given point or set of points 2. All segments that have a given set of endpoints 3. All segments that intersect a given line segment 4. All segments that are coincident with a given line segment Proximity queries. The nearest line segment to a given point 2. All segments within a given distance from a given point (also known as a range or window query) Queries involving attriutes of line segments. Given a point, find the closest line segment of a particular type 2. Given a point, find the minimum enclosing polygon whose constituent line segments are all of a given type 3. Given a point, find all the polygons that are incident on it Copyright 2008 y Hanan Samet 3

10 gs0 WHAT MAKES CONTINUOUS SPATIAL DATA DIFFERENT. Spatial extent of the ojects is the key to the difference 2. A record in a DBMS may e considered as a point in a multidimensional space a line can e transformed (i.e., represented) as a point in 4-d space with (x, y, x 2, y 2 ) (x 2, y 2 ) (x, y ) good for queries aout the line segments not good for proximity queries since points outside the oject are not mapped into the higher dimensional space representative points of two ojects that are physically close to each other in the original space (e.g., 2-d for lines) may e very far from each other in the higher dimensional space (e.g., 4-d) Ex: prolem is that the transformation only transforms the space occupied y the ojects and not the rest of the space (e.g., the query point) can overcome y projecting ack to original space 3. Use an index that sorts ased upon spatial occupancy (i.e., extent of the ojects) B A Copyright 2008 y Hanan Samet 4

11 hi29. SPATIAL INDEXING REQUIREMENTS. Compatiility with the data eing stored 2. Choose an appropriate zero or reference point 3. Need an implicit rather than an explicit index impossile to foresee all possile queries in advance cannot have an attriute for every possile spatial relationship a. derive adjacency relations. 2-d strings capture a suset of adjacencies all rows all columns implicit index is etter as an explicit index which, for example, sorts two-dimensional data on the asis of distance from a given point is impractical as it is inapplicale to other points implicit means that don't have to resort the data for queries other than updates Copyright 2008 y Hanan Samet 5

12 gs SORTING ON THE BASIS OF SPATIAL OCCUPANCY Decompose the space from which the data is drawn into regions called uckets (like hashing ut preserves order) Interested in methods that are designed specifically for the spatial data type eing stored Basic approaches to decomposing space. minimum ounding rectangles e.g., R-tree good at distinguishing empty and non-empty space drawacks: a. non-disjoint decomposition of space may need to search entire space. inaility to correlate occupied and unoccupied space in two maps 2. disjoint cells drawack: ojects may e reported more than once uniform grid a. all cells the same size. drawack: possiility of many sparse cells adaptive grid quadtree variants a. regular decomposition. all cells of width power of 2 partitions at aritrary positions a. drawack: not a regular decomposition. e.g., R + -tree Can use as approximations in filter/refine query processing strategy Copyright 2008 y Hanan Samet 6

13 MINIMUM BOUNDING RECTANGLES hi3 Ojects grouped into hierarchies, stored in a structure similar to a B-tree Drawack: not a disjoint decomposition of space Oject has single ounding rectangle, yet area that it spans may e included in several ounding rectangles Examples include the R-tree and the R*-tree Order (m,m ) R-tree. etween m M/2 and M entries in each node except root 2. at least 2 entries in root unless a leaf node a g h i e d f c Copyright 2008 y Hanan Samet 7

14 MINIMUM BOUNDING RECTANGLES hi3 Ojects grouped into hierarchies, stored in a structure similar to a B-tree Drawack: not a disjoint decomposition of space Oject has single ounding rectangle, yet area that it spans may e included in several ounding rectangles Examples include the R-tree and the R*-tree Order (m,m ) R-tree. etween m M/2 and M entries in each node except root 2. at least 2 entries in root unless a leaf node 2 r R3 R4 g h R5 a i R6 e d f c R3: a R4: d g h R5: c i R6: e f Copyright 2008 y Hanan Samet 7

15 MINIMUM BOUNDING RECTANGLES hi3 Ojects grouped into hierarchies, stored in a structure similar to a B-tree Drawack: not a disjoint decomposition of space Oject has single ounding rectangle, yet area that it spans may e included in several ounding rectangles Examples include the R-tree and the R*-tree Order (m,m ) R-tree. etween m M/2 and M entries in each node except root 2. at least 2 entries in root unless a leaf node 3 z 2 r R R3 R4 g h R5 R2 a i R6 e d f c R: R3 R4 R2: R5 R6 R3: a R4: d g h R5: c i R6: e f Copyright 2008 y Hanan Samet 7

16 MINIMUM BOUNDING RECTANGLES hi3 Ojects grouped into hierarchies, stored in a structure similar to a B-tree Drawack: not a disjoint decomposition of space Oject has single ounding rectangle, yet area that it spans may e included in several ounding rectangles Examples include the R-tree and the R*-tree Order (m,m ) R-tree. etween m M/2 and M entries in each node except root 2. at least 2 entries in root unless a leaf node 4 g 3 z 2 r R R3 R4 g h R5 R2 a i R6 e d f R0 c R0: R R2 R: R3 R4 R2: R5 R6 R3: a R4: d g h R5: c i R6: e f Copyright 2008 y Hanan Samet 7

17 SEARCHING FOR A POINT OR LINE SEGMENT IN AN R-TREE hi32 Drawack is that may have to examine many nodes since a line segment can e contained in the covering rectangles of many nodes yet its record is contained in only one leaf node (e.g., i in R2, R3, R4, and R5) Ex: Search for a line segment containing point Q R0: R R2 R: R3 R4 R2: R5 R6 R3: a R4: d g h R5: c i R6: e f R R3 h a g i R6 e R4 d Q f R0 R2 R5 c Copyright 2008 y Hanan Samet 8

18 SEARCHING FOR A POINT OR LINE SEGMENT IN AN R-TREE 2 v hi32 Drawack is that may have to examine many nodes since a line segment can e contained in the covering rectangles of many nodes yet its record is contained in only one leaf node (e.g., i in R2, R3, R4, and R5) Ex: Search for a line segment containing point Q R0: R R2 R: R3 R4 R2: R5 R6 R3: a R4: d g h R5: c i R6: e f R R3 h a g i R6 e R4 d Q f R0 R2 R5 c Q is in R0 Copyright 2008 y Hanan Samet 8

19 SEARCHING FOR A POINT OR LINE SEGMENT IN AN R-TREE hi32 Drawack is that may have to examine many nodes since a line segment can e contained in the covering rectangles of many nodes yet its record is contained in only one leaf node (e.g., i in R2, R3, R4, and R5) Ex: Search for a line segment containing point Q 3 r 2 v R0: R R2 R: R3 R4 R2: R5 R6 R3: a R4: d g h R5: c i R6: e f R R3 h a g i R6 e R4 d Q f R0 R2 R5 c Q is in R0 Q can e in oth R and R2 Copyright 2008 y Hanan Samet 8

20 SEARCHING FOR A POINT OR LINE SEGMENT IN AN R-TREE hi32 Drawack is that may have to examine many nodes since a line segment can e contained in the covering rectangles of many nodes yet its record is contained in only one leaf node (e.g., i in R2, R3, R4, and R5) Ex: Search for a line segment containing point Q 4 z 3 r 2 v R0: R R2 R: R3 R4 R2: R5 R6 R3: a R4: d g h R5: c i R6: e f R R3 h a g i R6 e R4 d Q f R0 R2 R5 c Q is in R0 Q can e in oth R and R2 Searching R first means that R4 is searched ut this leads to failure even though Q is part of i which is in R4 Copyright 2008 y Hanan Samet 8

21 SEARCHING FOR A POINT OR LINE SEGMENT IN AN R-TREE hi32 Drawack is that may have to examine many nodes since a line segment can e contained in the covering rectangles of many nodes yet its record is contained in only one leaf node (e.g., i in R2, R3, R4, and R5) Ex: Search for a line segment containing point Q 5 g 4 z 3 r 2 v R0: R R2 R: R3 R4 R2: R5 R6 R3: a R4: d g h R5: c i R6: e f R R3 h a g i R6 e R4 d Q f R0 R2 R5 c Q is in R0 Q can e in oth R and R2 Searching R first means that R4 is searched ut this leads to failure even though Q is part of i which is in R4 Searching R2 finds that Q can only e in R5 Copyright 2008 y Hanan Samet 8

22 DISJOINT CELLS hi33 Ojects decomposed into disjoint suojects; each suoject in different cell Techniques differ in degree of regularity Drawack: in order to determine area covered y oject, must retrieve all cells that it occupies R+-tree (also k-d-b-tree) and cell tree are examples of this technique a g h d Q i e f c Copyright 2008 y Hanan Samet 9

23 DISJOINT CELLS 2 r hi33 Ojects decomposed into disjoint suojects; each suoject in different cell Techniques differ in degree of regularity Drawack: in order to determine area covered y oject, must retrieve all cells that it occupies R+-tree (also k-d-b-tree) and cell tree are examples of this technique R6 R3 g h R4 R5 a i e d Q f c R3: d g h R4: c h i R5: c f i R6: a e i Copyright 2008 y Hanan Samet 9

24 DISJOINT CELLS 3 z 2 r hi33 Ojects decomposed into disjoint suojects; each suoject in different cell Techniques differ in degree of regularity Drawack: in order to determine area covered y oject, must retrieve all cells that it occupies R+-tree (also k-d-b-tree) and cell tree are examples of this technique R6 R2 R3 R g h R4 R5 a i e d Q f c R: R3 R4 R2: R5 R6 R3: d g h R4: c h i R5: c f i R6: a e i Copyright 2008 y Hanan Samet 9

25 DISJOINT CELLS 4 g 3 z 2 r hi33 Ojects decomposed into disjoint suojects; each suoject in different cell Techniques differ in degree of regularity Drawack: in order to determine area covered y oject, must retrieve all cells that it occupies R+-tree (also k-d-b-tree) and cell tree are examples of this technique R0 R6 R2 R3 R g h R4 R5 a i e d Q f c R0: R R2 R: R3 R4 R2: R5 R6 R3: d g h R4: c h i R5: c f i R6: a e i Copyright 2008 y Hanan Samet 9

26 K-D-B-TREES hi33. Rectangular emedding space is hierarchically decomposed into disjoint rectangular regions No dead space in the sense that at any level of the tree, entire emedding space is covered y one of the nodes Blocks of k-d tree partition of space are aggregated into nodes of a finite capacity When a node overflows, it is split along one of the axes Originally developed to store points ut may e extended to non-point ojects represented y their minimum ounding oxes Drawack: in order to determine area covered y oject, must retrieve all cells that it occupies a g h d Q i e f c Copyright 2008 y Hanan Samet

27 K-D-B-TREES 2 r hi33. Rectangular emedding space is hierarchically decomposed into disjoint rectangular regions No dead space in the sense that at any level of the tree, entire emedding space is covered y one of the nodes Blocks of k-d tree partition of space are aggregated into nodes of a finite capacity When a node overflows, it is split along one of the axes Originally developed to store points ut may e extended to non-point ojects represented y their minimum ounding oxes Drawack: in order to determine area covered y oject, must retrieve all cells that it occupies R3 R4 R6 a g h d Q R5 i e f c R3: d g h R4: c h i R5: c f i R6: Copyright 2008 y Hanan Samet a e i

28 K-D-B-TREES hi33. Rectangular emedding space is hierarchically decomposed into disjoint rectangular regions No dead space in the sense that at any level of the tree, entire emedding space is covered y one of the nodes Blocks of k-d tree partition of space are aggregated into nodes of a finite capacity When a node overflows, it is split along one of the axes Originally developed to store points ut may e extended to non-point ojects represented y their minimum ounding oxes Drawack: in order to determine area covered y oject, must retrieve all cells that it occupies 3 z 2 r R3 R4 R6 R R2 a g h d Q R5 i e f c R: R3 R4 R2: R5 R6 R3: d g h R4: c h i R5: c f i R6: Copyright 2008 y Hanan Samet a e i

29 K-D-B-TREES hi33. Rectangular emedding space is hierarchically decomposed into disjoint rectangular regions No dead space in the sense that at any level of the tree, entire emedding space is covered y one of the nodes Blocks of k-d tree partition of space are aggregated into nodes of a finite capacity When a node overflows, it is split along one of the axes Originally developed to store points ut may e extended to non-point ojects represented y their minimum ounding oxes Drawack: in order to determine area covered y oject, must retrieve all cells that it occupies 4 g 3 z 2 r R3 R4 R6 R R2 R0 a g h d Q R5 i e f c R0: R R2 R: R3 R4 R2: R5 R6 R3: d g h R4: c h i R5: c f i R6: Copyright 2008 y Hanan Samet a e i

30 hi34 UNIFORM GRID Ideal for uniformly distriuted data Supports set-theoretic operations Spatial data (e.g., line segment data) is rarely uniformly distriuted Copyright 2008 y Hanan Samet 0

31 QUADTREES hi35 Hierarchical variale resolution data structure ased on regular decomposition Many different decomposition schemes and applicale to different data types:. points 2. lines 3. regions 4. rectangles 5. surfaces 6. volumes 7. higher dimensions including time changes meaning of nearest a. nearest in time, OR. nearest in distance Can handle oth raster and vector data as just a spatial index Shape is usually independent of order of inserting data Ex: region quadtree A decomposition into locks not necessarily a tree! Copyright 2008 y Hanan Samet

32 hi36 REGION QUADTREE Repeatedly sudivide until otain homogeneous region For a inary image (BLACK and WHITE 0) Can also use for multicolored data (e.g., a landuse class map associating colors with crops) Can also define data structure for grayscale images A collection of maximal locks of size power of two and placed at predetermined positions. could implement as a list of locks each of which has a unique pair of numers: concatenate sequence of 2 it codes corresponding to the path from the root to the lock s node the level of the lock s node 2. does not have to e implemented as a tree tree good for logarithmic access A variale resolution data structure in contrast to a pyramid (i.e., a complete quadtree) which is a multiresolution data structure B F H G I J N O L M Q NW NE A SE SW B C D E K P F G H I J L M N O Q Copyright 2008 y Hanan Samet 2

33 SPACE REQUIREMENTS. Rationale for using quadtrees/octrees is not so much for saving space ut for saving execution time g7 2. Execution time of standard image processing algorithms that are ased on traversing the entire image and performing a computation at each image element is proportional to the numer of locks in the decomposition of the image rather than their size aggregation of space leads directly to execution time savings as the aggregate (i.e., lock) is visited just once instead of once for each image element (i.e., pixel, voxel) in the aggregate (e.g., connected component laeling) 3. If want to save space, then, in general, statistical image compression methods are superior drawack: statistical methods are not progressive as need to transmit the entire image whereas quadtrees lend themselves to progressive approximation quadtrees, though, do achieve compression as a result of use of common suexpression elimination techniques a. e.g., checkeroard image. see also vector quantization 4. Sensitive to positioning of the origin of the decomposition for an n x n image, the optimal positioning requires an O(n 2 log 2 n) dynamic programming algorithm (Li, Grosky, and Jain) Copyright 2008 y Hanan Samet

34 DIMENSION REDUCTION g8. Numer of locks necessary to store a simple polygon as a region quadtree is proportional to its perimeter (Hunter) implies that many quadtree algorithms execute in O(perimeter) time as they are tree traversals the region quadtree is a dimension reducing device as perimeter (ignoring fractal effects) is a onedimensional measure and we are starting with twodimensional data generalizes to higher dimensions a. region octree takes O (surface area) time and space (Meagher). d-dimensional data take time and space proportional to a O (d-)-dimensional quantity (Walsh) 2. Alternatively, for a region quadtree, the space requirements doule as the resolution doules in contrast with quadrupling in the array representation for a region octree the space requirements quadruple as the resolution doules ex. array region quadtree Copyright 2008 y Hanan Samet

35 DIMENSION REDUCTION g8. Numer of locks necessary to store a simple polygon as a region quadtree is proportional to its perimeter (Hunter) implies that many quadtree algorithms execute in O(perimeter) time as they are tree traversals the region quadtree is a dimension reducing device as perimeter (ignoring fractal effects) is a onedimensional measure and we are starting with twodimensional data generalizes to higher dimensions a. region octree takes O (surface area) time and space (Meagher). d-dimensional data take time and space proportional to a O (d-)-dimensional quantity (Walsh) 2. Alternatively, for a region quadtree, the space requirements doule as the resolution doules in contrast with quadrupling in the array representation for a region octree the space requirements quadruple as the resolution doules ex. array 2 r region quadtree Copyright 2008 y Hanan Samet

36 DIMENSION REDUCTION g8. Numer of locks necessary to store a simple polygon as a region quadtree is proportional to its perimeter (Hunter) implies that many quadtree algorithms execute in O(perimeter) time as they are tree traversals the region quadtree is a dimension reducing device as perimeter (ignoring fractal effects) is a onedimensional measure and we are starting with twodimensional data generalizes to higher dimensions a. region octree takes O (surface area) time and space (Meagher). d-dimensional data take time and space proportional to a O (d-)-dimensional quantity (Walsh) 2. Alternatively, for a region quadtree, the space requirements doule as the resolution doules in contrast with quadrupling in the array representation for a region octree the space requirements quadruple as the resolution doules ex. array 3 z 2 r region quadtree Copyright 2008 y Hanan Samet

37 DIMENSION REDUCTION g8. Numer of locks necessary to store a simple polygon as a region quadtree is proportional to its perimeter (Hunter) implies that many quadtree algorithms execute in O(perimeter) time as they are tree traversals the region quadtree is a dimension reducing device as perimeter (ignoring fractal effects) is a onedimensional measure and we are starting with twodimensional data generalizes to higher dimensions a. region octree takes O (surface area) time and space (Meagher). d-dimensional data take time and space proportional to a O (d-)-dimensional quantity (Walsh) 2. Alternatively, for a region quadtree, the space requirements doule as the resolution doules in contrast with quadrupling in the array representation for a region octree the space requirements quadruple as the resolution doules ex. array 4 g 3 z 2 r region quadtree Copyright 2008 y Hanan Samet

38 DIMENSION REDUCTION g8. Numer of locks necessary to store a simple polygon as a region quadtree is proportional to its perimeter (Hunter) implies that many quadtree algorithms execute in O(perimeter) time as they are tree traversals the region quadtree is a dimension reducing device as perimeter (ignoring fractal effects) is a onedimensional measure and we are starting with twodimensional data generalizes to higher dimensions a. region octree takes O (surface area) time and space (Meagher). d-dimensional data take time and space proportional to a O (d-)-dimensional quantity (Walsh) 2. Alternatively, for a region quadtree, the space requirements doule as the resolution doules in contrast with quadrupling in the array representation for a region octree the space requirements quadruple as the resolution doules ex. array 5 r 4 g 3 z 2 r region quadtree easy to see dependence on perimeter as decomposition only takes place on the oundary as the resolution increases Copyright 2008 y Hanan Samet

39 SILC Path Encoding The SILC path encoding takes advantage of the path coherence Scalale Network Distance Browsing in Spatial Dataases p.2/43

40 SILC Path Encoding The SILC path encoding takes advantage of the path coherence How? Use a coloring algorithm Scalale Network Distance Browsing in Spatial Dataases p.2/43

41 SILC Path Encoding The SILC path encoding takes advantage of the path coherence How? Use a coloring algorithm u Source vertex u in a spatial network Scalale Network Distance Browsing in Spatial Dataases p.2/43

42 SILC Path Encoding The SILC path encoding takes advantage of the path coherence How? Use a coloring algorithm u Source vertex u in a spatial network Assign colors to the outgoing edges of u Scalale Network Distance Browsing in Spatial Dataases p.2/43

43 SILC Path Encoding The SILC path encoding takes advantage of the path coherence How? Use a coloring algorithm u Source vertex u in a spatial network Assign colors to the outgoing edges of u Color vertex ased on the first edge on the shortest path from u Scalale Network Distance Browsing in Spatial Dataases p.2/43

44 SILC Path Encoding The SILC path encoding takes advantage of the path coherence How? Use a coloring algorithm u Source vertex u in a spatial network Assign colors to the outgoing edges of u Color vertex ased on the first edge on the shortest path from u Source vertex u in the spatial network of Silver Spring, MD Scalale Network Distance Browsing in Spatial Dataases p.2/43

45 SILC Path Encoding The SILC path encoding takes advantage of the path coherence How? Use a coloring algorithm u Source vertex u in a spatial network Assign colors to the outgoing edges of u Color vertex ased on the first edge on the shortest path from u Source vertex u in the spatial network of Silver Spring, MD Color remaining vertices ased on which of the six adjacent vertices of u is the first link in the shortest path from u Scalale Network Distance Browsing in Spatial Dataases p.2/43

46 SILC Path Encoding The SILC path encoding takes advantage of the path coherence How? Use a coloring algorithm u Source vertex u in a spatial network Assign colors to the outgoing edges of u Color vertex ased on the first edge on the shortest path from u Source vertex u in the spatial network of Silver Spring, MD Resulting representation is termed the shortest-path map of u Color remaining vertices ased on which of the six adjacent vertices of u is the first link in the shortest path from u Scalale Network Distance Browsing in Spatial Dataases p.2/43

47 SILC Path Encoding The SILC path encoding takes advantage of the path coherence How? Use a coloring algorithm u Source vertex u in a spatial network Assign colors to the outgoing edges of u Color vertex ased on the first edge on the shortest path from u Source vertex u in the spatial network of Silver Spring, MD Resulting representation is termed the shortest-path map of u Color remaining vertices ased on which of the six adjacent vertices of u is the first link in the shortest path from u Assuming planar spatial network graphs means that the coloring results in spatially contiguous colored regions due to path coherence Scalale Network Distance Browsing in Spatial Dataases p.2/43

48 How to Store Colored Regions? Shortest-path Map Scalale Network Distance Browsing in Spatial Dataases p.3/43

49 How to Store Colored Regions? Minimum ounding oxes (e.g., R-tree) [Wagn03] Shortest-path Map R-tree Scalale Network Distance Browsing in Spatial Dataases p.3/43

50 How to Store Colored Regions? Minimum ounding oxes (e.g., R-tree) [Wagn03] Shortest-path Map R-tree Scalale Network Distance Browsing in Spatial Dataases p.3/43

51 How to Store Colored Regions? Minimum ounding oxes (e.g., R-tree) [Wagn03] Shortest-path Map R-tree Scalale Network Distance Browsing in Spatial Dataases p.3/43

52 How to Store Colored Regions? Minimum ounding oxes (e.g., R-tree) [Wagn03] Shortest-path Map R-tree Scalale Network Distance Browsing in Spatial Dataases p.3/43

53 How to Store Colored Regions? Minimum ounding oxes (e.g., R-tree) [Wagn03] Shortest-path Map R-tree Scalale Network Distance Browsing in Spatial Dataases p.3/43

54 How to Store Colored Regions? Minimum ounding oxes (e.g., R-tree) [Wagn03] Shortest-path Map R-tree Scalale Network Distance Browsing in Spatial Dataases p.3/43

55 How to Store Colored Regions? Minimum ounding oxes (e.g., R-tree) [Wagn03] Shortest-path Map R-tree Scalale Network Distance Browsing in Spatial Dataases p.3/43

56 How to Store Colored Regions? Minimum ounding oxes (e.g., R-tree) [Wagn03] overlapping oxes imply identity of next vertex cannot e uniquely determined causing the shortest path algorithm to possily degenerate to Dijkstra s algorithm Shortest-path Map R-tree Scalale Network Distance Browsing in Spatial Dataases p.3/43

57 How to Store Colored Regions? Minimum ounding oxes (e.g., R-tree) [Wagn03] overlapping oxes imply identity of next vertex cannot e uniquely determined causing the shortest path algorithm to possily degenerate to Dijkstra s algorithm Shortest-path Map Disjoint decomposition: shortest-path quadtree R-tree Shortest-Path Quadtree Scalale Network Distance Browsing in Spatial Dataases p.3/43

58 How to Store Colored Regions? Minimum ounding oxes (e.g., R-tree) [Wagn03] overlapping oxes imply identity of next vertex cannot e uniquely determined causing the shortest path algorithm to possily degenerate to Dijkstra s algorithm Shortest-path Map Disjoint decomposition: shortest-path quadtree Decompose until all vertices in lock have the same color R-tree Shortest-Path Quadtree Scalale Network Distance Browsing in Spatial Dataases p.3/43

59 How to Store Colored Regions? Minimum ounding oxes (e.g., R-tree) [Wagn03] overlapping oxes imply identity of next vertex cannot e uniquely determined causing the shortest path algorithm to possily degenerate to Dijkstra s algorithm Shortest-path Map Disjoint decomposition: shortest-path quadtree Decompose until all vertices in lock have the same color Shortest-path quadtree stored as a collection of Morton locks R-tree Shortest-Path Quadtree Scalale Network Distance Browsing in Spatial Dataases p.3/43

60 How to Store Colored Regions? Minimum ounding oxes (e.g., R-tree) [Wagn03] overlapping oxes imply identity of next vertex cannot e uniquely determined causing the shortest path algorithm to possily degenerate to Dijkstra s algorithm Shortest-path Map Disjoint decomposition: shortest-path quadtree Decompose until all vertices in lock have the same color Shortest-path quadtree stored as a collection of Morton locks Note: no need to store identity of vertices in the locks R-tree Shortest-Path Quadtree Scalale Network Distance Browsing in Spatial Dataases p.3/43

61 How to Store Colored Regions? Minimum ounding oxes (e.g., R-tree) [Wagn03] overlapping oxes imply identity of next vertex cannot e uniquely determined causing the shortest path algorithm to possily degenerate to Dijkstra s algorithm Shortest-path Map Disjoint decomposition: shortest-path quadtree Decompose until all vertices in lock have the same color Shortest-path quadtree stored as a collection of Morton locks Note: no need to store identity of vertices in the locks Proposed encoding leverages the dimensionality reduction property of MX and region quadtrees Required storage cost to represent a region R in a region and MX quadtree is O(p), where p is the perimeter of R R-tree Shortest-Path Quadtree Scalale Network Distance Browsing in Spatial Dataases p.3/43

62 Quadtree Complexity Theorem Quadtree corresponding to a polygon of perimeter p emedded in a 2 q 2 q image has O(p + q) nodes (Hunter) g h a e d i f c Simple Polygons MX Quadtree Region Quadtree Scalale Network Distance Browsing in Spatial Dataases p.4/43

63 Quadtree Complexity Theorem Quadtree corresponding to a polygon of perimeter p emedded in a 2 q 2 q image has O(p + q) nodes (Hunter) g h a e d i f c Simple Polygons MX Quadtree Easy to see dependence on perimeter as decomposition only takes place on the oundary as the resolution increases Region Quadtree Scalale Network Distance Browsing in Spatial Dataases p.4/43

64 Quadtree Complexity Theorem Quadtree corresponding to a polygon of perimeter p emedded in a 2 q 2 q image has O(p + q) nodes (Hunter) g h a e d i f c Simple Polygons MX Quadtree Easy to see dependence on perimeter as decomposition only takes place on the oundary as the resolution increases Shortest-path quadtree requires less space than MX and region quadtrees as no decomposition takes place at oundaries that pass through empty nodes even though numer of polygons exceeds the vertex outdegree Region Quadtree Scalale Network Distance Browsing in Spatial Dataases p.4/43

65 Quadtree Complexity Theorem Quadtree corresponding to a polygon of perimeter p emedded in a 2 q 2 q image has O(p + q) nodes (Hunter) g h a e d i f c Simple Polygons MX Quadtree Easy to see dependence on perimeter as decomposition only takes place on the oundary as the resolution increases Shortest-path quadtree requires less space than MX and region quadtrees as no decomposition takes place at oundaries that pass through empty nodes even though numer of polygons exceeds the vertex outdegree Region Quadtree a c d q Scalale Network Distance Browsing in Spatial Dataases p.4/43

66 Quadtree Complexity Theorem Quadtree corresponding to a polygon of perimeter p emedded in a 2 q 2 q image has O(p + q) nodes (Hunter) g h a e d i f c Simple Polygons MX Quadtree Easy to see dependence on perimeter as decomposition only takes place on the oundary as the resolution increases Shortest-path quadtree requires less space than MX and region quadtrees as no decomposition takes place at oundaries that pass through empty nodes even though numer of polygons exceeds the vertex outdegree Region Quadtree a c d q Scalale Network Distance Browsing in Spatial Dataases p.4/43

67 Quadtree Complexity Theorem Quadtree corresponding to a polygon of perimeter p emedded in a 2 q 2 q image has O(p + q) nodes (Hunter) g h a e d i f c Simple Polygons MX Quadtree Easy to see dependence on perimeter as decomposition only takes place on the oundary as the resolution increases Shortest-path quadtree requires less space than MX and region quadtrees as no decomposition takes place at oundaries that pass through empty nodes even though numer of polygons exceeds the vertex outdegree Region Quadtree a c d q Scalale Network Distance Browsing in Spatial Dataases p.4/43

68 Quadtree Complexity Theorem on Shortest-Path Map Quadtree Complexity theorem cannot e directly applied to shortest-path quadtrees owing to the discontinuous regions Scalale Network Distance Browsing in Spatial Dataases p.5/43

69 Quadtree Complexity Theorem on Shortest-Path Map Quadtree Complexity theorem cannot e directly applied to shortest-path quadtrees owing to the discontinuous regions However, for planar graphs the shortest-path map of a vertex is contiguous Scalale Network Distance Browsing in Spatial Dataases p.5/43

70 Quadtree Complexity Theorem on Shortest-Path Map Quadtree Complexity theorem cannot e directly applied to shortest-path quadtrees owing to the discontinuous regions However, for planar graphs the shortest-path map of a vertex is contiguous Scalale Network Distance Browsing in Spatial Dataases p.5/43

71 Quadtree Complexity Theorem on Shortest-Path Map Quadtree Complexity theorem cannot e directly applied to shortest-path quadtrees owing to the discontinuous regions However, for planar graphs the shortest-path map of a vertex is contiguous Quadtree Complexity Theorem can e applied to the MX-quadtree for the polygons containing the regions in the shortest-path map Scalale Network Distance Browsing in Spatial Dataases p.5/43

72 Quadtree Complexity Theorem on Shortest-Path Map Quadtree Complexity theorem cannot e directly applied to shortest-path quadtrees owing to the discontinuous regions However, for planar graphs the shortest-path map of a vertex is contiguous Quadtree Complexity Theorem can e applied to the MX-quadtree for the polygons containing the regions in the shortest-path map Size of shortest-path quadtree is no more than the MX quadtree as no need to decompose, to the pixel level, the empty locks through which the oundaries pass Scalale Network Distance Browsing in Spatial Dataases p.5/43

73 Quadtree Complexity Theorem on Shortest-Path Map Quadtree Complexity theorem cannot e directly applied to shortest-path quadtrees owing to the discontinuous regions However, for planar graphs the shortest-path map of a vertex is contiguous Quadtree Complexity Theorem can e applied to the MX-quadtree for the polygons containing the regions in the shortest-path map Size of shortest-path quadtree is no more than the MX quadtree as no need to decompose, to the pixel level, the empty locks through which the oundaries pass Scalale Network Distance Browsing in Spatial Dataases p.5/43

74 Quadtree Complexity Theorem on Shortest-Path Map Quadtree Complexity theorem cannot e directly applied to shortest-path quadtrees owing to the discontinuous regions However, for planar graphs the shortest-path map of a vertex is contiguous Quadtree Complexity Theorem can e applied to the MX-quadtree for the polygons containing the regions in the shortest-path map Size of shortest-path quadtree is no more than the MX quadtree as no need to decompose, to the pixel level, the empty locks through which the oundaries pass Hence, shortest-path quadtrees are at worse O(perimeter) i.e., dimension reducing Scalale Network Distance Browsing in Spatial Dataases p.5/43

75 Space Complexity Analysis of Shortest-Path Quadtrees Consider a spatial network containing N vertices Scalale Network Distance Browsing in Spatial Dataases p.6/43

76 Space Complexity Analysis of Shortest-Path Quadtrees Consider a spatial network containing N vertices in a square grid of size N 0.5 N 0.5 and emed it N 0.5 N 0.5 Scalale Network Distance Browsing in Spatial Dataases p.6/43

77 Space Complexity Analysis of Shortest-Path Quadtrees Consider a spatial network containing N vertices in a square grid of size N 0.5 N 0.5 and emed it Perimeter of a region with monotonic oundary on one of its coordinates is of size O(N 0.5 ) N 0.5 N 0.5 Scalale Network Distance Browsing in Spatial Dataases p.6/43

78 Space Complexity Analysis of Shortest-Path Quadtrees Consider a spatial network containing N vertices in a square grid of size N 0.5 N 0.5 and emed it Perimeter of a region with monotonic oundary on one of its coordinates is of size O(N 0.5 ) Perimeter of a region with a non-monotonic oundary can e of size O(N)!!!!!!!! " " " " " " " " # # # # # # # # $ $ $ $ $ $ $ $ $ $ $ $ % % % % % % % % & & & & & & & & ' ' ' ' ' ' ' ' N 0.5 N 0.5 N 0.5 N 0.5 Scalale Network Distance Browsing in Spatial Dataases p.6/43

79 Space Complexity Analysis of Shortest-Path Quadtrees Consider a spatial network containing N vertices in a square grid of size N 0.5 N 0.5 and emed it Perimeter of a region with monotonic oundary on one of its coordinates is of size O(N 0.5 ) Perimeter of a region with a non-monotonic oundary can e of size O(N) Assumption: Regions of the shortest-path quadtree have monotonic oundaries ( ( ( ( ( ( ( ( ( ( ( ( ) ) ) ) ) ) ) ) * * * * * * * * * * * * ,,,,,,,,,,,, / / / / / / / / : : : : : : : : ; ; ; ; ; ; ; ; N 0.5 N 0.5 N 0.5 N 0.5 Scalale Network Distance Browsing in Spatial Dataases p.6/43

80 Space Complexity Analysis of Shortest-Path Quadtrees Consider a spatial network containing N vertices in a square grid of size N 0.5 N 0.5 and emed it Perimeter of a region with monotonic oundary on one of its coordinates is of size O(N 0.5 ) Perimeter of a region with a non-monotonic oundary can e of size O(N) Assumption: Regions of the shortest-path quadtree have monotonic oundaries Size of a shortest-path quadtree of a vertex u is c N < < < < < < < < < < < < = = = = = = = = > > > > > > > > > > A A A A A A A A B B B B B B B B B B B B C C C C C C C C D D D D D D D D D D D D E E E E E E E E F F F F F F F F F F F F G G G G G G G G H H H H H H H H I I I I I I I I J J J J J J J J K K K K K K K K L L L L L L L L L L L L M M M M M M M M N N N N N N N N O O O O O O O O N 0.5 N 0.5 N 0.5 N 0.5 Scalale Network Distance Browsing in Spatial Dataases p.6/43

81 Space Complexity Analysis of Shortest-Path Quadtrees Consider a spatial network containing N vertices in a square grid of size N 0.5 N 0.5 and emed it Perimeter of a region with monotonic oundary on one of its coordinates is of size O(N 0.5 ) Perimeter of a region with a non-monotonic oundary can e of size O(N) Assumption: Regions of the shortest-path quadtree have monotonic oundaries Size of a shortest-path quadtree of a vertex u is c N, where c is a function of the outdegree of u P P P P P P P P P P P P Q Q Q Q Q Q Q Q R R R R R R R R R R R R S S S S S S S S T T T T T T T T T T T T U U U U U U U U V V V V V V V V V V V V W W W W W W W W X X X X X X X X X X X X Y Y Y Y Y Y Y Y Z Z Z Z Z Z Z Z Z Z Z Z [ [ [ [ [ [ [ [ \ \ \ \ \ \ \ \ ] ] ] ] ] ] ] ] ^ ^ ^ ^ ^ ^ ^ ^ ` ` ` ` ` ` ` ` ` ` ` ` a a a a a a a a c c c c c c c c N 0.5 N 0.5 N 0.5 N 0.5 Scalale Network Distance Browsing in Spatial Dataases p.6/43

82 Space Complexity Analysis of Shortest-Path Quadtrees Consider a spatial network containing N vertices in a square grid of size N 0.5 N 0.5 and emed it Perimeter of a region with monotonic oundary on one of its coordinates is of size O(N 0.5 ) Perimeter of a region with a non-monotonic oundary can e of size O(N) Assumption: Regions of the shortest-path quadtree have monotonic oundaries Size of a shortest-path quadtree of a vertex u is c N, where c is a function of the outdegree of u Total storage complexity of the SILC framework is O(N N); closely follows empirical results d d d d d d d d d d d d e e e e e e e e f f f f f f f f f f f f g g g g g g g g h h h h h h h h h h h h i i i i i i i i j j j j j j j j j j j j k k k k k k k k l l l l l l l l l l l l m m m m m m m m n n n n n n n n n n n n o o o o o o o o p p p p p p p p q q q q q q q q r r r r r r r r s s s s s s s s t t t t t t t t t t t t u u u u u u u u v v v v v v v v w w w w w w w w N 0.5 N e+06 e+07 e Numer of Morton locks (M) (log scale) Numer of Vertices (N) (log scale) Slope =.5 Scalale Network Distance Browsing in Spatial Dataases p.6/43

83 Space Complexity Analysis of Shortest-Path Quadtrees Consider a spatial network containing N vertices in a square grid of size N 0.5 N 0.5 and emed it Perimeter of a region with monotonic oundary on one of its coordinates is of size O(N 0.5 ) Perimeter of a region with a non-monotonic oundary can e of size O(N) Assumption: Regions of the shortest-path quadtree have monotonic oundaries Size of a shortest-path quadtree of a vertex u is c N, where c is a function of the outdegree of u Total storage complexity of the SILC framework is O(N N); closely follows empirical results Contriution: A mechanism to capture shortest paths in spatial networks ased solely on geometry and independent of topology or connectivity x x x x x x x x x x x x y y y y y y y y z z z z z z z z z z z z { { { { { { { { } } } } } } } } ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ˆ ˆ ˆ ˆ ˆ ˆ ˆ ˆ ˆ ˆ ˆ ˆ Š Š Š Š Š Š Š Š N 0.5 N e+06 e+07 e Numer of Morton locks (M) (log scale) Numer of Vertices (N) (log scale) Slope =.5 Scalale Network Distance Browsing in Spatial Dataases p.6/43

84 hi37 PYRAMID Internal nodes contain summary of information in nodes elow them Useful for avoiding inspecting nodes where there could e no relevant information c c2 c3 c4 c5 c6 {c,c2,c3,c4,c5,c6} {c6} {c2,c3,c6} {c2,c3,c4,c5} {c,c2,c3, c4,c5,c6} Copyright 2008 y Hanan Samet 3

85 hi38 QUADTREES VS. PYRAMIDS Quadtrees are good for location-ased queries. e.g., what is at location x? 2. not good if looking for a particular feature as have to examine every lock or location asking are you the one I am looking for? Pyramid is good for feature-ased queries e.g.,. does wheat exist in region x? if wheat does not appear at the root node, then impossile to find it in the rest of the structure and the search can cease 2. report all crops in region x just look at the root 3. select all locations where wheat is grown only descend node if there is possiility that wheat is in one of its four sons implies little wasted work Ex: truncated pyramid where 4 identically-colored sons are merged {c,c2,c3,c4,c5,c6} {c6} {c2,c3,c6} {c2,c3,c4,c5} {c,c2,c3, c4,c5,c6} c c2 c3 c4 c5 c6 {c2,c3,c5} {c,c2,c3,c5} Can represent as a list of leaf and nonleaf locks (e.g., as a linear quadtree) Copyright 2008 y Hanan Samet 4

86 PR QUADTREE (Orenstein) Regular decomposition point representation hp9 Decomposition occurs whenever a lock contains more than one point Useful when the domain of data points is not discrete ut finite Maximum level of decomposition depends on the minimum separation etween two points if two points are very close, then decomposition can e very deep can e overcome y viewing locks as uckets with capacity c and only decomposing the lock when it contains more than c points Ex: c = (0,00) (00,00) (35,42) Chicago (0,0) (00,0) Copyright 2008 y Hanan Samet 5

87 PR QUADTREE (Orenstein) Regular decomposition point representation hp9 Decomposition occurs whenever a lock contains more than one point Useful when the domain of data points is not discrete ut finite Maximum level of decomposition depends on the minimum separation etween two points if two points are very close, then decomposition can e very deep can e overcome y viewing locks as uckets with capacity c and only decomposing the lock when it contains more than c points Ex: c = (0,00) (00,00) 2 r (35,42) Chicago (0,0) (52,0) Moile (00,0) Copyright 2008 y Hanan Samet 5

88 PR QUADTREE (Orenstein) Regular decomposition point representation hp9 Decomposition occurs whenever a lock contains more than one point Useful when the domain of data points is not discrete ut finite Maximum level of decomposition depends on the minimum separation etween two points if two points are very close, then decomposition can e very deep can e overcome y viewing locks as uckets with capacity c and only decomposing the lock when it contains more than c points Ex: c = (0,00) (00,00) 3 z 2 r (62,77) Toronto (35,42) Chicago (0,0) (52,0) Moile (00,0) Copyright 2008 y Hanan Samet 5

89 PR QUADTREE (Orenstein) Regular decomposition point representation hp9 Decomposition occurs whenever a lock contains more than one point Useful when the domain of data points is not discrete ut finite Maximum level of decomposition depends on the minimum separation etween two points if two points are very close, then decomposition can e very deep can e overcome y viewing locks as uckets with capacity c and only decomposing the lock when it contains more than c points Ex: c = (0,00) (00,00) 4 g 3 z 2 r (62,77) Toronto (35,42) Chicago (82,65) Buffalo (0,0) (52,0) Moile (00,0) Copyright 2008 y Hanan Samet 5

90 PR QUADTREE (Orenstein) Regular decomposition point representation hp9 Decomposition occurs whenever a lock contains more than one point Useful when the domain of data points is not discrete ut finite Maximum level of decomposition depends on the minimum separation etween two points if two points are very close, then decomposition can e very deep can e overcome y viewing locks as uckets with capacity c and only decomposing the lock when it contains more than c points Ex: c = (0,00) (00,00) 5 v 4 g 3 z 2 r (62,77) Toronto (82,65) Buffalo (5,45) Denver (35,42) Chicago (0,0) (52,0) Moile (00,0) Copyright 2008 y Hanan Samet 5

91 PR QUADTREE (Orenstein) Regular decomposition point representation hp9 Decomposition occurs whenever a lock contains more than one point Useful when the domain of data points is not discrete ut finite Maximum level of decomposition depends on the minimum separation etween two points if two points are very close, then decomposition can e very deep can e overcome y viewing locks as uckets with capacity c and only decomposing the lock when it contains more than c points Ex: c = (0,00) (00,00) 6 g 5 v 4 g 3 z 2 r (62,77) Toronto (82,65) Buffalo (5,45) Denver (35,42) Chicago (27,35) Omaha (0,0) (52,0) Moile (00,0) Copyright 2008 y Hanan Samet 5

92 PR QUADTREE (Orenstein) Regular decomposition point representation hp9 Decomposition occurs whenever a lock contains more than one point Useful when the domain of data points is not discrete ut finite Maximum level of decomposition depends on the minimum separation etween two points if two points are very close, then decomposition can e very deep can e overcome y viewing locks as uckets with capacity c and only decomposing the lock when it contains more than c points Ex: c = (0,00) (00,00) 7 z 6 g 5 v 4 g 3 z 2 r (62,77) Toronto (82,65) Buffalo (5,45) Denver (35,42) Chicago (27,35) Omaha (85,5) Atlanta (0,0) (52,0) Moile (00,0) Copyright 2008 y Hanan Samet 5

93 PR QUADTREE (Orenstein) Regular decomposition point representation hp9 Decomposition occurs whenever a lock contains more than one point Useful when the domain of data points is not discrete ut finite Maximum level of decomposition depends on the minimum separation etween two points if two points are very close, then decomposition can e very deep can e overcome y viewing locks as uckets with capacity c and only decomposing the lock when it contains more than c points Ex: c = (0,00) (00,00) 8 r 7 z 6 g 5 v 4 g 3 z 2 r (62,77) Toronto (82,65) Buffalo (5,45) Denver (35,42) Chicago (27,35) Omaha (85,5) Atlanta (0,0) (52,0) Moile (90,5) Miami (00,0) Copyright 2008 y Hanan Samet 5

94 PR quadtree REGION SEARCH Ex: Find all points within radius r of point A hp0 r A Use of quadtree results in pruning the search space Copyright 2008 y Hanan Samet

95 PR quadtree REGION SEARCH Ex: Find all points within radius r of point A 2 r hp r 5 4 A Use of quadtree results in pruning the search space If a quadrant sudivision point p lies in a region l, then search the quadrants of p specified y l. SE 6. NE. All ut SW 2. SE, SW 7. NE, NW 2. All ut SE 3. SW 8. NW 3. All 4. SE, NE 9. All ut NW 5. SW, NW 0. All ut NE Copyright 2008 y Hanan Samet

96 PR quadtree REGION SEARCH Ex: Find all points within radius r of point A 3 z 2 r hp r 5 4 p A Use of quadtree results in pruning the search space If a quadrant sudivision point p lies in a region l, then search the quadrants of p specified y l. SE 6. NE. All ut SW 2. SE, SW 7. NE, NW 2. All ut SE 3. SW 8. NW 3. All 4. SE, NE 9. All ut NW 5. SW, NW 0. All ut NE Copyright 2008 y Hanan Samet

97 PR quadtree REGION SEARCH Ex: Find all points within radius r of point A 4 g 3 z 2 r hp0 p r 5 4 A Use of quadtree results in pruning the search space If a quadrant sudivision point p lies in a region l, then search the quadrants of p specified y l. SE 6. NE. All ut SW 2. SE, SW 7. NE, NW 2. All ut SE 3. SW 8. NW 3. All 4. SE, NE 9. All ut NW 5. SW, NW 0. All ut NE Copyright 2008 y Hanan Samet

98 PR quadtree REGION SEARCH Ex: Find all points within radius r of point A 5 v 4 g 3 z 2 r hp r p 5 4 A Use of quadtree results in pruning the search space If a quadrant sudivision point p lies in a region l, then search the quadrants of p specified y l. SE 6. NE. All ut SW 2. SE, SW 7. NE, NW 2. All ut SE 3. SW 8. NW 3. All 4. SE, NE 9. All ut NW 5. SW, NW 0. All ut NE Copyright 2008 y Hanan Samet

99 FINDING THE NEAREST OBJECT Ex: find the nearest oject to P E C hp B 5 D P 2 A 3 0 F Assume PR quadtree for points (i.e., at most one point per lock) Search neighors of lock in counterclockwise order Points are sorted with respect to the space they occupy which enales pruning the search space Algorithm: Copyright 2008 y Hanan Samet 7

100 FINDING THE NEAREST OBJECT Ex: find the nearest oject to P E C 2 r hp B 5 D P 2 A 3 0 F Assume PR quadtree for points (i.e., at most one point per lock) Search neighors of lock in counterclockwise order Points are sorted with respect to the space they occupy which enales pruning the search space Algorithm:. start at lock 2 and compute distance to P from A Copyright 2008 y Hanan Samet 7

101 FINDING THE NEAREST OBJECT Ex: find the nearest oject to P E C 3 z 2 r hp B 5 D P 2 A 3 0 F Assume PR quadtree for points (i.e., at most one point per lock) Search neighors of lock in counterclockwise order Points are sorted with respect to the space they occupy which enales pruning the search space Algorithm:. start at lock 2 and compute distance to P from A 2. ignore lock 3 whether or not it is empty as A is closer to P than any point in 3 Copyright 2008 y Hanan Samet 7

102 FINDING THE NEAREST OBJECT Ex: find the nearest oject to P E C 4 g 3 z 2 r hp B 5 D P 2 A 3 0 F Assume PR quadtree for points (i.e., at most one point per lock) Search neighors of lock in counterclockwise order Points are sorted with respect to the space they occupy which enales pruning the search space Algorithm:. start at lock 2 and compute distance to P from A 2. ignore lock 3 whether or not it is empty as A is closer to P than any point in 3 3. examine lock 4 as distance to SW corner is shorter than the distance from P to A; however, reject B as it is further from P than A Copyright 2008 y Hanan Samet 7

103 FINDING THE NEAREST OBJECT Ex: find the nearest oject to P E C 5 v 4 g 3 z 2 r hp B 5 D P 2 A 3 0 F Assume PR quadtree for points (i.e., at most one point per lock) Search neighors of lock in counterclockwise order Points are sorted with respect to the space they occupy which enales pruning the search space Algorithm:. start at lock 2 and compute distance to P from A 2. ignore lock 3 whether or not it is empty as A is closer to P than any point in 3 3. examine lock 4 as distance to SW corner is shorter than the distance from P to A; however, reject B as it is further from P than A 4. ignore locks 6, 7, 8, 9, and 0 as the minimum distance to them from P is greater than the distance from P to A Copyright 2008 y Hanan Samet 7

104 FINDING THE NEAREST OBJECT Ex: find the nearest oject to P E C 6 z 5 v 4 g 3 z 2 r hp B 5 D P 2 A 3 0 F Assume PR quadtree for points (i.e., at most one point per lock) Search neighors of lock in counterclockwise order Points are sorted with respect to the space they occupy which enales pruning the search space Algorithm:. start at lock 2 and compute distance to P from A 2. ignore lock 3 whether or not it is empty as A is closer to P than any point in 3 3. examine lock 4 as distance to SW corner is shorter than the distance from P to A; however, reject B as it is further from P than A 4. ignore locks 6, 7, 8, 9, and 0 as the minimum distance to them from P is greater than the distance from P to A 5. examine lock as the distance from P to the southern order of is shorter than the distance from P to A; however, reject F as it is further from P than A Copyright 2008 y Hanan Samet 7

105 FINDING THE NEAREST OBJECT 7 r 6 z 5 v 4 g 3 z 2 r hp Ex: find the nearest oject to P E C B 5 D P 2 A 3 0 new F F Assume PR quadtree for points (i.e., at most one point per lock) Search neighors of lock in counterclockwise order Points are sorted with respect to the space they occupy which enales pruning the search space Algorithm:. start at lock 2 and compute distance to P from A 2. ignore lock 3 whether or not it is empty as A is closer to P than any point in 3 3. examine lock 4 as distance to SW corner is shorter than the distance from P to A; however, reject B as it is further from P than A 4. ignore locks 6, 7, 8, 9, and 0 as the minimum distance to them from P is greater than the distance from P to A 5. examine lock as the distance from P to the southern order of is shorter than the distance from P to A; however, reject F as it is further from P than A If F was moved, a etter order would have started with lock, the southern neighor of, as it is closest Copyright 2008 y Hanan Samet 7

106 INCREMENTAL NEAREST NEIGHBORS (HJATASON/SAMET) Motivation hp. often don't know in advance how many neighors will need 2. e.g., want nearest city to Chicago with population > million Several approaches. guess some area range around Chicago and check populations of cities in range if find a city with population > million, must make sure that there are no other cities that are closer with population > million inefficient as have to guess size of area to search prolem with guessing is we may choose too small a region or too large a region a. if size too small, area may not contain any cities with right population and need to expand the search region. if size too large, may e examining many cities needlessly 2. sort all the cities y distance from Chicago impractical as we need to re-sort them each time pose a similar query with respect to another city also sorting is overkill when only need first few neighors 3. find k closest neighors and check population condition Copyright 2008 y Hanan Samet

107 MECHANICS OF INCREMENTAL NEAREST NEIGHBOR ALGORITHM hpc Make use of a search hierarchy (e.g., tree) where. ojects at lowest level 2. oject approximations are at next level (e.g., ounding oxes in an R-tree) 3. nonleaf nodes in a tree-ased index Traverse search hierarchy in a est-first manner similar to A*-algorithm instead of more traditional depth-first or readth-first manners. at each step, visit element with smallest distance from query oject among all unvisited elements in the search hierarchy i.e., all unvisited elements whose parents have een visited 2. use a gloal list of elements, organized y their distance from query oject use a priority queue as it supports necessary insert and delete minimum operations ties in distance: priority to lower type numers if still tied, priority to elements deeper in search hierarchy Copyright 2008 y Hanan Samet

108 INCREMENTAL NEAREST NEIGHBOR ALGORITHM Algorithm: INCNEAREST(q, S, T). Q NEWPRIORITYQUEUE() 2. e t root of the search hierarchy induced y q, S, and T 3. ENQUEUE(Q, e t, 0) 4. while not ISEMPTY(Q) do 5. e t DEQUEUE(Q) 6. if t = 0 then /* e t is an oject */ 7. Report e t as the next nearest oject 8. else 9. for each child element e t of e t do 0. ENQUEUE(Q, e t, d t (q, e t )) hpd 3. Lines -3 initialize priority queue with root 4. In main loop take element e t closest to q off the queue report e t as next nearest oject if e t is an oject otherwise, insert child elements of e t into priority queue Copyright 2008 y Hanan Samet

109 PM QUADTREE cd32 Vertex-ased (one vertex per lock) a DECOMPOSITION RULE: Partitioning occurs when a lock contains more than one segment unless all the segments are incident at the same vertex which is also in the same lock Shape independent of order of insertion Copyright 2008 y Hanan Samet 8

110 PM QUADTREE 2 r cd32 Vertex-ased (one vertex per lock) a DECOMPOSITION RULE: Partitioning occurs when a lock contains more than one segment unless all the segments are incident at the same vertex which is also in the same lock Shape independent of order of insertion Copyright 2008 y Hanan Samet 8

111 PM QUADTREE 3 z 2 r cd32 Vertex-ased (one vertex per lock) a c DECOMPOSITION RULE: Partitioning occurs when a lock contains more than one segment unless all the segments are incident at the same vertex which is also in the same lock Shape independent of order of insertion Copyright 2008 y Hanan Samet 8

112 PM QUADTREE 4 g 3 z 2 r cd32 Vertex-ased (one vertex per lock) a d c DECOMPOSITION RULE: Partitioning occurs when a lock contains more than one segment unless all the segments are incident at the same vertex which is also in the same lock Shape independent of order of insertion Copyright 2008 y Hanan Samet 8

113 PM QUADTREE 5 v 4 g 3 z 2 r cd32 Vertex-ased (one vertex per lock) a e d c DECOMPOSITION RULE: Partitioning occurs when a lock contains more than one segment unless all the segments are incident at the same vertex which is also in the same lock Shape independent of order of insertion Copyright 2008 y Hanan Samet 8

114 PM QUADTREE 6 r 5 v 4 g 3 z 2 r cd32 Vertex-ased (one vertex per lock) a e d f c DECOMPOSITION RULE: Partitioning occurs when a lock contains more than one segment unless all the segments are incident at the same vertex which is also in the same lock Shape independent of order of insertion Copyright 2008 y Hanan Samet 8

115 PM QUADTREE 7 z 6 r 5 v 4 g 3 z 2 r cd32 Vertex-ased (one vertex per lock) a g e d f c DECOMPOSITION RULE: Partitioning occurs when a lock contains more than one segment unless all the segments are incident at the same vertex which is also in the same lock Shape independent of order of insertion Copyright 2008 y Hanan Samet 8

116 PM QUADTREE 8 g 7 z 6 r 5 v 4 g 3 z 2 r cd32 Vertex-ased (one vertex per lock) a h g e d f c DECOMPOSITION RULE: Partitioning occurs when a lock contains more than one segment unless all the segments are incident at the same vertex which is also in the same lock Shape independent of order of insertion Copyright 2008 y Hanan Samet 8

117 PM QUADTREE 9 v 8 g 7 z 6 r 5 v 4 g 3 z 2 r cd32 Vertex-ased (one vertex per lock) a h g e d i f c DECOMPOSITION RULE: Partitioning occurs when a lock contains more than one segment unless all the segments are incident at the same vertex which is also in the same lock Shape independent of order of insertion Copyright 2008 y Hanan Samet 8

118 MX-CIF QUADTREE (Kedem) Collections of small rectangles for VLSI applications Each rectangle is associated with its minimum enclosing quadtree lock hp4 Like hashing: quadtree locks serve as hash uckets B 3 6 E C A D 0 F 2 A {2,6,7,8,9,0} B {} C {} D {} E {3,4,5} F {2} Copyright 2008 y Hanan Samet 24

119 MX-CIF QUADTREE (Kedem) Collections of small rectangles for VLSI applications Each rectangle is associated with its minimum enclosing quadtree lock hp4 Like hashing: quadtree locks serve as hash uckets Collision = more than one rectangle in a lock resolve y using two one-dimensional MX-CIF trees to store the rectangle intersecting the lines passing through each sudivision point 2 r B 3 6 E C A D 0 F 2 A {2,6,7,8,9,0} B {} C {} D {} E {3,4,5} F {2} Copyright 2008 y Hanan Samet 24

120 MX-CIF QUADTREE (Kedem) Collections of small rectangles for VLSI applications Each rectangle is associated with its minimum enclosing quadtree lock hp4 Like hashing: quadtree locks serve as hash uckets Collision = more than one rectangle in a lock resolve y using two one-dimensional MX-CIF trees to store the rectangle intersecting the lines passing through each sudivision point one for y-axis 3 g 2 r Binary tree for y- axis through A 7 B A E C 9 Y2 Y 0 Y4 8 6 Y6 Y3 Y5 2 Y7 D 0 F 2 A {2,6,7,8,9,0} B {} C {} D {} E {3,4,5} F {2} Copyright 2008 y Hanan Samet 24

121 MX-CIF QUADTREE (Kedem) Collections of small rectangles for VLSI applications Each rectangle is associated with its minimum enclosing quadtree lock hp4 Like hashing: quadtree locks serve as hash uckets Collision = more than one rectangle in a lock resolve y using two one-dimensional MX-CIF trees to store the rectangle intersecting the lines passing through each sudivision point one for y-axis if a rectangle intersects oth x and y axes, then associate it with the y axis 4 v 3 g 2 r Binary tree for y- axis through A 7 B A E C 9 Y2 Y 0 Y4 8 6 Y6 Y3 Y5 2 Y7 D 0 F 2 A {2,6,7,8,9,0} B {} C {} D {} E {3,4,5} F {2} Copyright 2008 y Hanan Samet 24

122 MX-CIF QUADTREE (Kedem) Collections of small rectangles for VLSI applications Each rectangle is associated with its minimum enclosing quadtree lock hp4 Like hashing: quadtree locks serve as hash uckets Collision = more than one rectangle in a lock resolve y using two one-dimensional MX-CIF trees to store the rectangle intersecting the lines passing through each sudivision point one for y-axis if a rectangle intersects oth x and y axes, then associate it with the y axis one for x-axis 5 z 4 v 3 g 2 r Binary tree for y- axis through A 7 B A E D C 9 Y2 Y 0 Y4 8 6 Y6 Y3 Y5 2 Y7 Binary tree for x- axis through A 0 F 2 X4 X2 X 9 X5 X3 A {2,6,7,8,9,0} X6 7 B {} C {} D {} E {3,4,5} F {2} Copyright 2008 y Hanan Samet 24

123 Loose Quadtree (Octree)/Cover Fieldtree Overcomes drawack of MX-CIF quadtree that the width w of the minimum enclosing quadtree lock of a rectangle o is not a function of the size of o B E 6 C A D F 2 A {2,6,7,8,9,0} {} B E {3,4,5} C{} D{} F{ 2} Copyright 2008 y Hanan Samet

124 Loose Quadtree (Octree)/Cover Fieldtree Overcomes drawack of MX-CIF quadtree that the width w of the minimum enclosing quadtree lock of a rectangle o is not a function of the size of o Instead, it depends on the position of the centroid of o and often consideraly larger than o B 2 3 E C A D F 2 A {2,6,7,8,9,0} {} B E {3,4,5} C{} D{} F{ 2} Copyright 2008 y Hanan Samet

125 Loose Quadtree (Octree)/Cover Fieldtree Overcomes drawack of MX-CIF quadtree that the width w of the minimum enclosing quadtree lock of a rectangle o is not a function of the size of o Instead, it depends on the position of the centroid of o and often consideraly larger than o B 2 3 E C A D F 2 A {2,6,7,8,9,0} {} B E {3,4,5} C{} D{} F{ 2} Copyright 2008 y Hanan Samet

126 Loose Quadtree (Octree)/Cover Fieldtree Overcomes drawack of MX-CIF quadtree that the width w of the minimum enclosing quadtree lock of a rectangle o is not a function of the size of o Instead, it depends on the position of the centroid of o and often consideraly larger than o Solution: expand size of space 2 spanned y each quadtree lock of width w y expansion factor p (p > 0) so expanded lock is of width ( + p)w B 3 6 E A 4 5 C D F 2 A {2,6,7,8,9,0} {} B E {3,4,5} C{} D{} F{ 2} Copyright 2008 y Hanan Samet

127 Loose Quadtree (Octree)/Cover Fieldtree Overcomes drawack of MX-CIF quadtree that the width w of the minimum enclosing quadtree lock of a rectangle o is not a function of the size of o Instead, it depends on the position of the centroid of o and often consideraly larger than o Solution: expand size of space 2 spanned y each quadtree lock of width w y expansion factor p (p > 0) so expanded lock is of width ( + p)w B 3 6 E. p = A 4 5 C 9 0 D F 2 A {2,6,7,8,9,0} B {} E {3,4,5} C{2,9} {6} {7,8,0} D{} F{,2} Copyright 2008 y Hanan Samet

128 Loose Quadtree (Octree)/Cover Fieldtree Overcomes drawack of MX-CIF quadtree that the width w of the minimum enclosing quadtree lock of a rectangle o is not a function of the size of o Instead, it depends on the position of the centroid of o and often consideraly larger than o Solution: expand size of space 2 spanned y each quadtree lock of width w y expansion factor p (p > 0) so expanded lock is of width ( + p)w B 3 6 E. p = p = A 4 5 C 9 0 D F 2 A {} B{} E C{2,9} {7,8,0} {2,4} {5} {3} {6} {9} {7} {8} {0} D{} {,2} F {} {2} Copyright 2008 y Hanan Samet

129 Loose Quadtree (Octree)/Cover Fieldtree Overcomes drawack of MX-CIF quadtree that the width w of the minimum enclosing quadtree lock of a rectangle o is not a function of the size of o Instead, it depends on the position of the centroid of o and often consideraly larger than o Solution: expand size of space 2 spanned y each quadtree lock of width w y expansion factor p (p > 0) so expanded lock is of width ( + p)w B 3 6 E. p = p = A 4 5 C 9 Maximum w (i.e., minimum depth of minimum enclosing quadtree lock) is a function of p and radius r of o and independent of position of centroid of o. Range of possile ratios w/2r : /( + p) w/2r < 2/p 2. For p, restricting w and r to powers of 2, w/2r takes on at most 2 values and usually just {} B{} E C{2,9} 0 {2,4} {5} {3} {6} {9} {7} {8} {0} A {7,8,0} D F 2 D{} {,2} F {} {2} Copyright 2008 y Hanan Samet

130 Partition Fieldtree Alternative to loose quadtree (octree)/cover fieldtree at overcoming drawack of MX-CIF quadtree that the width w of the minimum enclosing quadtree lock of a rectangle o is not a function of the size of o Copyright 2008 y Hanan Samet

131 Partition Fieldtree Alternative to loose quadtree (octree)/cover fieldtree at overcoming drawack of MX-CIF quadtree that the width w of the minimum enclosing quadtree lock of a rectangle o is not a function of the size of o Achieves similar result y shifting positions of the centroid of quadtree locks at successive levels of the sudivision y one half of the width of the lock that is eing sudivided Copyright 2008 y Hanan Samet

132 Partition Fieldtree Alternative to loose quadtree (octree)/cover fieldtree at overcoming drawack of MX-CIF quadtree that the width w of the minimum enclosing quadtree lock of a rectangle o is not a function of the size of o Achieves similar result y shifting positions of the centroid of quadtree locks at successive levels of the sudivision y one half of the width of the lock that is eing sudivided Copyright 2008 y Hanan Samet

133 Partition Fieldtree Alternative to loose quadtree (octree)/cover fieldtree at overcoming drawack of MX-CIF quadtree that the width w of the minimum enclosing quadtree lock of a rectangle o is not a function of the size of o Achieves similar result y shifting positions of the centroid of quadtree locks at successive levels of the sudivision y one half of the width of the lock that is eing sudivided Copyright 2008 y Hanan Samet

134 Partition Fieldtree Alternative to loose quadtree (octree)/cover fieldtree at overcoming drawack of MX-CIF quadtree that the width w of the minimum enclosing quadtree lock of a rectangle o is not a function of the size of o Achieves similar result y shifting positions of the centroid of quadtree locks at successive levels of the sudivision y one half of the width of the lock that is eing sudivided Copyright 2008 y Hanan Samet

135 Partition Fieldtree Alternative to loose quadtree (octree)/cover fieldtree at overcoming drawack of MX-CIF quadtree that the width w of the minimum enclosing quadtree lock of a rectangle o is not a function of the size of o Achieves similar result y shifting positions of the centroid of quadtree locks at successive levels of the sudivision y one half of the width of the lock that is eing sudivided Sudivision rule guarantees that width of minimum enclosing quadtree lock for rectangle o is ounded y 8 times the maximum extent r of o Copyright 2008 y Hanan Samet

136 Partition Fieldtree Alternative to loose quadtree (octree)/cover fieldtree at overcoming drawack of MX-CIF quadtree that the width w of the minimum enclosing quadtree lock of a rectangle o is not a function of the size of o Achieves similar result y shifting positions of the centroid of quadtree locks at successive levels of the sudivision y one half of the width of the lock that is eing sudivided Sudivision rule guarantees that width of minimum enclosing quadtree lock for rectangle o is ounded y 8 times the maximum extent r of o o Copyright 2008 y Hanan Samet

137 Partition Fieldtree Alternative to loose quadtree (octree)/cover fieldtree at overcoming drawack of MX-CIF quadtree that the width w of the minimum enclosing quadtree lock of a rectangle o is not a function of the size of o Achieves similar result y shifting positions of the centroid of quadtree locks at successive levels of the sudivision y one half of the width of the lock that is eing sudivided Sudivision rule guarantees that width of minimum enclosing quadtree lock for rectangle o is ounded y 8 times the maximum extent r of o o Copyright 2008 y Hanan Samet

138 Partition Fieldtree Alternative to loose quadtree (octree)/cover fieldtree at overcoming drawack of MX-CIF quadtree that the width w of the minimum enclosing quadtree lock of a rectangle o is not a function of the size of o Achieves similar result y shifting positions of the centroid of quadtree locks at successive levels of the sudivision y one half of the width of the lock that is eing sudivided Sudivision rule guarantees that width of minimum enclosing quadtree lock for rectangle o is ounded y 8 times the maximum extent r of o o Copyright 2008 y Hanan Samet

139 Partition Fieldtree Alternative to loose quadtree (octree)/cover fieldtree at overcoming drawack of MX-CIF quadtree that the width w of the minimum enclosing quadtree lock of a rectangle o is not a function of the size of o Achieves similar result y shifting positions of the centroid of quadtree locks at successive levels of the sudivision y one half of the width of the lock that is eing sudivided Sudivision rule guarantees that width of minimum enclosing quadtree lock for rectangle o is ounded y 8 times the maximum extent r of o r o Copyright 2008 y Hanan Samet

140 Partition Fieldtree Alternative to loose quadtree (octree)/cover fieldtree at overcoming drawack of MX-CIF quadtree that the width w of the minimum enclosing quadtree lock of a rectangle o is not a function of the size of o Achieves similar result y shifting positions of the centroid of quadtree locks at successive levels of the sudivision y one half of the width of the lock that is eing sudivided Sudivision rule guarantees that width of minimum enclosing quadtree lock for rectangle o is ounded y 8 times the maximum extent r of o Same ratio is otained for the loose quadtree (octree)/cover fieldtree when p =/4, and thus partition fieldtree is superior to the cover fieldtree when p </4 r o Copyright 2008 y Hanan Samet

141 Partition Fieldtree Alternative to loose quadtree (octree)/cover fieldtree at overcoming drawack of MX-CIF quadtree that the width w of the minimum enclosing quadtree lock of a rectangle o is not a function of the size of o Achieves similar result y shifting positions of the centroid of quadtree locks at successive levels of the sudivision y one half of the width of the lock that is eing sudivided Sudivision rule guarantees that width of minimum enclosing quadtree lock for rectangle o is ounded y 8 times the maximum extent r of o Same ratio is otained for the loose quadtree (octree)/cover fieldtree when p =/4, and thus partition fieldtree is superior to the cover fieldtree when p </4 Summary: cover fieldtree expands the width of the quadtree locks while the partition fieldtree shifts the positions of their centroids r o Copyright 2008 y Hanan Samet

142 HIERARCHICAL RECTANGULAR DECOMPOSITION Similar to triangular decomposition Good when data points are the vertices of a rectangular grid Drawack is asence of continuity etween adjacent patches of unequal width (termed the alignment prolem) sf2 Overcoming the presence of cracks. use the interpolated point instead of the true point (Barrera and Hinjosa) 2. triangulate the squares (Von Herzen and Barr) can split into 2, 4, or 8 triangles depending on how many lines are drawn through the midpoint if split into 2 triangles, then cracks still remain no cracks if split into 4 or 8 triangles Copyright 2008 y Hanan Samet 25

143 RESTRICTED QUADTREE (VON HERZEN/BARR) sf3 All 4-adjacent locks are either of equal size or of ratio 2: Note: also used in finite element analysis to adptively refine an element as well as to achieve element compatiility (termed h-refinement y Kela, Perucchio, and Voelcker) Copyright 2008 y Hanan Samet 26

144 RESTRICTED QUADTREE (VON HERZEN/BARR) 2 r sf3 All 4-adjacent locks are either of equal size or of ratio 2: Note: also used in finite element analysis to adptively refine an element as well as to achieve element compatiility (termed h-refinement y Kela, Perucchio, and Voelcker) Copyright 2008 y Hanan Samet 26

145 RESTRICTED QUADTREE (VON HERZEN/BARR) 3 z 2 r sf3 All 4-adjacent locks are either of equal size or of ratio 2: Note: also used in finite element analysis to adptively refine an element as well as to achieve element compatiility (termed h-refinement y Kela, Perucchio, and Voelcker) 8-triangle decomposition rule. decompose each lock into 8 triangles (i.e., 2 triangles per edge) 2. unless the edge is shared y a larger lock 3. in which case only triangle is formed Copyright 2008 y Hanan Samet 26

146 RESTRICTED QUADTREE (VON HERZEN/BARR) sf3 All 4-adjacent locks are either of equal size or of ratio 2: Note: also used in finite element analysis to adptively refine an element as well as to achieve element compatiility (termed h-refinement y Kela, Perucchio, and Voelcker) 4 g 3 z 2 r 8-triangle decomposition rule. decompose each lock into 8 triangles (i.e., 2 triangles per edge) 2. unless the edge is shared y a larger lock 3. in which case only triangle is formed 4-triangle decomposition rule. decompose each lock into 4 triangles (i.e., triangle per edge) 2. unless the edge is shared y a smaller lock 3. in which case 2 triangles are formed along the edge Copyright 2008 y Hanan Samet 26

147 RESTRICTED QUADTREE (VON HERZEN/BARR) sf3 All 4-adjacent locks are either of equal size or of ratio 2: Note: also used in finite element analysis to adptively refine an element as well as to achieve element compatiility (termed h-refinement y Kela, Perucchio, and Voelcker) 5 v 4 g 3 z 2 r 8-triangle decomposition rule. decompose each lock into 8 triangles (i.e., 2 triangles per edge) 2. unless the edge is shared y a larger lock 3. in which case only triangle is formed 4-triangle decomposition rule. decompose each lock into 4 triangles (i.e., triangle per edge) 2. unless the edge is shared y a smaller lock 3. in which case 2 triangles are formed along the edge Prefer 8-triangle rule as it is etter for display applications (shading) Copyright 2008 y Hanan Samet 26

148 sf4 PROPERTY SPHERES (FEKETE) Approximation of spherical data Uses icosahedron which is a Platonic solid. 20 faces each is a regular triangle 2. largest possile regular polyhedron Copyright 2008 y Hanan Samet 27

149 sf5 ALTERNATIVE SPHERICAL APPROXIMATIONS Could use other Platonic solids. all have faces that are regular polygons tetrahedron: 4 equilateral triangular faces hexahedron: 6 square faces octahedron: 8 equilateral triangular faces dodecahedron: 2 pentagonal faces 2. octahedron is nice for modeling the gloe it can e aligned so that the poles are at opposite vertices the prime meridian and the equator intersect at another vertex one sudivision line of each face is parallel to the equator Decompose on the asis of latitude and longitude values. not so good if want a partition into units of equal area as great prolems around the poles 2. project sphere onto plane using Lamert s cylindrical projection which is locally area preserving Instead of approximating sphere with the solids, project the faces of the solids on the sphere (Scott). all edges ecome su-arcs of a great circle 2. use regular decomposition on triangular, square, or pentagonal spherical surface patches Copyright 2008 y Hanan Samet 28

150 hi60 OCTREES. Interior (voxels) analogous to region quadtree approximate oject y aggregating similar voxels good for medical images ut not for ojects with planar faces Ex: 4 5 A B Boundary adaptation of PM quadtree to three-dimensional data decompose until each lock contains a. one face. more than one face ut all meet at same edge c. more than one edge ut all meet at same vertex impose a spatial index on a oundary model (BRep) Copyright 2008 y Hanan Samet 29

151 hi39 EXAMPLE QUADTREE-BASED QUERY Query: find all cities with population in excess of 5,000 in wheat growing regions within 0 miles of the Mississippi River. assume river is a linear feature use a line map could e a region if asked for sandars in the river 2. region map for the wheat 3. assume cities are points point map for cities could e region is asked for high income areas Comines spatial and non-spatial (i.e., attriute) data Many possile execution plans - e.g.,. compute uffer or corridor around river 2. extract wheat area 3. intersect with 2 4. intersect city map with 3 5. retrieve value of population attriute for cities in 4 from the nonspatial dataase (e.g., relational) Regular decomposition hierarchical data structures such as the quadtree. all maps are in registration all locks are in the same positions not true for R+-trees and BSP trees disjoint decomposition of space - unlike R-tree 2. can perform set-theoretic operations on different feature types (e.g., 3 and 4) Copyright 2008 y Hanan Samet

152 FURTHER READING rf. F. Braec and H. Samet, Client ased spatial rowsing on the world wide we. IEEE Internet Computing, ():52 59, Jan/Fe H. Samet, Foundations of Multidimensional and Metric Data Structures, Morgan Kaufmann, San Francisco, [ ook flyer.pdf] 3. H. Samet, Applications of Spatial Data Structures: Computer Graphics, Image Processing, and GIS, Addison Wesley, Reading, MA, H. Samet, Design and Analysis of Spatial Data Structures, Addison Wesley, Reading, MA, Spatial Data Applets at Copyright (c) 2008 y Hanan Samet

153 MORGAN KAUFMANN PUBLISHERS Foundations of Multidimensional and Metric Data Structures By Hanan Samet, University of Maryland at College Park 024 pages August 2006 ISBN Hardcover $ $ The field of multidimensional and metric data structures is large and growing very quickly. Here, for the first time, is a thorough treatment of multidimensional point data, oject and image-ased oject representations, intervals and small rectangles, high-dimensional datasets, as well as datasets for which we only know that they reside in a metric space. 20% OFF! The ook includes a thorough introduction; a comprehensive survey of multidimensional (including spatial) and metric data structures and algorithms; and implementation details for the most useful data structures. Along with the hundreds of worked exercises and hundreds of illustrations, the result is an excellent and valuale reference tool for professionals in many areas, including computer graphics and visualization, dataases, geographic information systems (GIS), and spatial dataases, game programming, image processing and computer vision, pattern recognition, solid modelling and computational geometry, similarity retrieval and multimedia dataases, and VLSI design, and search aspects of ioinformatics. Features First comprehensive work on multidimensional and metric data structures availale, a thorough and authoritative treatment. An algorithmic rather than mathematical approach, with a lieral use of examples that allows the readers to easily see the possile implementation and use. Each section includes a large numer of exercises and solutions to self-test and confirm the reader's understanding and suggest future directions. Written y a well-known authority in the area of multidimensional (including spatial) data structures who has made many significant contriutions to the field. Hanan Samet is the dean of "spatial indexing"... This ook is encyclopedic... this ook will e invaluale for those of us who struggle with spatial data, scientific datasets, graphics, vision prolems involving volumetric queries, or with higher dimensional datasets common in data mining. - From the foreword y Jim Gray, Microsoft Research Samet's ook on multidimensional and metric data structures is the most complete and thorough presentation on this topic. It has road coverage of material from computational geometry, dataases, graphics, GIS, and similarity retrieval literature. Written y the leading authority on hierarchical spatial representations, this ook is a "must have" for all instructor, researches, and developers working and teaching in these areas. - Dinesh Manocha, University of North Carolina at Chapel Hill To summarize, this ook is excellent! It s a very comprehensive survey of spatial and multidimensional data structures and algorithms, which is adly needed. The readth and depth of coverage is astounding and I would consider several parts of it required reading for real time graphics and game developers. - Bretton Wade, University of Washington and Microsoft Corp. Order from Morgan Kaufmann Pulishers and receive 20% off! Please refer to code 855. Mail: Elsevier Science, Order Fulfillment, 830 Westline Industrial Dr., St. Louis, MO 6346 Phone: US/Canada , (Intl.) Fax: , (Intl.) uskinfo@elsevier.com Visit Morgan Kaufmann on the We: Volume discounts availale, contact: NASpecialSales@elsevier.com

Sorting in Space. Hanan Samet hjs

Sorting in Space. Hanan Samet   hjs Sorting in Space Multidimensional, Spatial, and Metric Data Structures for Applications in Spatial Dataases, Geographic Information Systems (GIS), and Location-Based Services Hanan Samet hjs@cs.umd.edu

More information

Sorting in Space p.1/3

Sorting in Space p.1/3 Sorting in Space Multidimensional, Spatial, and Metric Data Structures for Computer Graphics Applications Hanan Samet hjs@cs.umd.edu http://www.cs.umd.edu/ hjs Department of Computer Science University

More information

Sorting in Space: Multidimensional Data Structures for Computer Graphics and Vision Applications

Sorting in Space: Multidimensional Data Structures for Computer Graphics and Vision Applications Sorting in Space: Multidimensional Data Structures for Computer Graphics and Vision Applications Hanan Samet hjs@cs.umd.edu http://www.cs.umd.edu/ hjs Department of Computer Science University of Maryland

More information

HIERARCHICAL REPRESENTATIONS OF LINE DATA. Hanan Samet

HIERARCHICAL REPRESENTATIONS OF LINE DATA. Hanan Samet cd0 HIERARCHICAL REPRESENTATIONS OF LINE DATA Hanan Samet Computer Science Department and Center for Automation Research and Institute for Advanced Computer Studies University of Maryland College Park,

More information

18 Multidimensional Data Structures 1

18 Multidimensional Data Structures 1 18 Multidimensional Data Structures 1 Hanan Samet University of Maryland 18.1 Introduction 18.2 PointData 18.3 BucketingMethods 18.4 RegionData 18.5 RectangleData 18.6 LineDataandBoundariesofRegions 18.7

More information

SORTING IN SPACE HANAN SAMET

SORTING IN SPACE HANAN SAMET SORTING IN SPACE HANAN SAMET COMPUTER SCIENCE DEPARTMENT AND CENTER FOR AUTOMATION RESEARCH AND INSTITUTE FOR ADVANCED COMPUTER STUDIES UNIVERSITY OF MARYLAND COLLEGE PARK, MARYLAND 2742-34 USA e mail:

More information

Similarity Searching:

Similarity Searching: Similarity Searching: Indexing, Nearest Neighbor Finding, Dimensionality Reduction, and Embedding Methods, for Applications in Multimedia Databases Hanan Samet hjs@cs.umd.edu Department of Computer Science

More information

CAR-TR-990 CS-TR-4526 UMIACS September 2003

CAR-TR-990 CS-TR-4526 UMIACS September 2003 CAR-TR-990 CS-TR-4526 UMIACS 2003-94 September 2003 Object-based and Image-based Object Representations Hanan Samet Computer Science Department Center for Automation Research Institute for Advanced Computer

More information

Speeding Up Ray Tracing. Optimisations. Ray Tracing Acceleration

Speeding Up Ray Tracing. Optimisations. Ray Tracing Acceleration Speeding Up Ray Tracing nthony Steed 1999, eline Loscos 2005, Jan Kautz 2007-2009 Optimisations Limit the number of rays Make the ray test faster for shadow rays the main drain on resources if there are

More information

Organizing Spatial Data

Organizing Spatial Data Organizing Spatial Data Spatial data records include a sense of location as an attribute. Typically location is represented by coordinate data (in 2D or 3D). 1 If we are to search spatial data using the

More information

Programming Assignment 1: A Data Structure For VLSI Applications 1

Programming Assignment 1: A Data Structure For VLSI Applications 1 Fall 2014 CMSC 420 Hanan Samet Programming Assignment 1: A Data Structure For VLSI Applications 1 Abstract In this assignment you are required to implement an information management system for handling

More information

Ray Tracing Acceleration Data Structures

Ray Tracing Acceleration Data Structures Ray Tracing Acceleration Data Structures Sumair Ahmed October 29, 2009 Ray Tracing is very time-consuming because of the ray-object intersection calculations. With the brute force method, each ray has

More information

A PROBABILISTIC ANALYSIS OF TRIE-BASED SORTING OF LARGE COLLECTIONS OF LINE SEGMENTS IN SPATIAL DATABASES

A PROBABILISTIC ANALYSIS OF TRIE-BASED SORTING OF LARGE COLLECTIONS OF LINE SEGMENTS IN SPATIAL DATABASES SIAM J. COMPUT. Vol. 35, No., pp. 58 c 005 Society for Industrial and Applied Mathematics A PROBABILISTIC ANALYSIS OF TRIE-BASED SORTING OF LARGE COLLECTIONS OF LINE SEGMENTS IN SPATIAL DATABASES MICHAEL

More information

layers in a raster model

layers in a raster model layers in a raster model Layer 1 Layer 2 layers in an vector-based model (1) Layer 2 Layer 1 layers in an vector-based model (2) raster versus vector data model Raster model Vector model Simple data structure

More information

Geometric Algorithms. Geometric search: overview. 1D Range Search. 1D Range Search Implementations

Geometric Algorithms. Geometric search: overview. 1D Range Search. 1D Range Search Implementations Geometric search: overview Geometric Algorithms Types of data:, lines, planes, polygons, circles,... This lecture: sets of N objects. Range searching Quadtrees, 2D trees, kd trees Intersections of geometric

More information

SILC: Efficient Query Processing on Spatial Networks

SILC: Efficient Query Processing on Spatial Networks Hanan Samet hjs@cs.umd.edu Department of Computer Science University of Maryland College Park, MD 20742, USA Joint work with Jagan Sankaranarayanan and Houman Alborzi Proceedings of the 13th ACM International

More information

Visualizing and Animating Search Operations on Quadtrees on the Worldwide Web

Visualizing and Animating Search Operations on Quadtrees on the Worldwide Web Visualizing and Animating Search Operations on Quadtrees on the Worldwide Web František Brabec Computer Science Department University of Maryland College Park, Maryland 20742 brabec@umiacs.umd.edu Hanan

More information

Intersection Acceleration

Intersection Acceleration Advanced Computer Graphics Intersection Acceleration Matthias Teschner Computer Science Department University of Freiburg Outline introduction bounding volume hierarchies uniform grids kd-trees octrees

More information

Spatial Data Structures

Spatial Data Structures 15-462 Computer Graphics I Lecture 17 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees Constructive Solid Geometry (CSG) April 1, 2003 [Angel 9.10] Frank Pfenning Carnegie

More information

Foundations of Multidimensional and Metric Data Structures

Foundations of Multidimensional and Metric Data Structures Foundations of Multidimensional and Metric Data Structures Hanan Samet University of Maryland, College Park ELSEVIER AMSTERDAM BOSTON HEIDELBERG LONDON NEW YORK OXFORD PARIS SAN DIEGO SAN FRANCISCO SINGAPORE

More information

Spatial Data Structures

Spatial Data Structures 15-462 Computer Graphics I Lecture 17 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees Constructive Solid Geometry (CSG) March 28, 2002 [Angel 8.9] Frank Pfenning Carnegie

More information

Spatial Data Structures

Spatial Data Structures Spatial Data Structures Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees Constructive Solid Geometry (CSG) [Angel 9.10] Outline Ray tracing review what rays matter? Ray tracing speedup faster

More information

Quadtrees and Meshing

Quadtrees and Meshing Computational Geometry Lecture INSTITUT FÜR THEORETISCHE INFORMATIK FAKULTÄT FÜR INFORMATIK Tamara Mchedlidze Darren Strash 14.12.2015 Motivation: Meshing PC Board Layouts To simulate the heat produced

More information

SORTING IN SPACE HANAN SAMET

SORTING IN SPACE HANAN SAMET SORTING IN SPACE HANAN SAMET COMPUTER SCIENCE DEPARTMENT AND CENTER FOR AUTOMATION RESEARCH AND INSTITUTE FOR ADVANCED COMPUTER STUDIES UNIVERSITY OF MARYLAND COLLEGE PARK, MARYLAND 2742-34 USA e mail:

More information

SORTING IN SPACE HANAN SAMET

SORTING IN SPACE HANAN SAMET SORTING IN SPACE HANAN SAMET COMPUTER SCIENCE DEPARTMENT AND CENTER FOR AUTOMATION RESEARCH AND INSTITUTE FOR ADVANCED COMPUTER STUDIES UNIVERSITY OF MARYLAND COLLEGE PARK, MARYLAND 074-4 USA e mail: hjs@cs.umd.edu

More information

Algorithms for GIS:! Quadtrees

Algorithms for GIS:! Quadtrees Algorithms for GIS: Quadtrees Quadtree A data structure that corresponds to a hierarchical subdivision of the plane Start with a square (containing inside input data) Divide into 4 equal squares (quadrants)

More information

Spatial Data Structures

Spatial Data Structures CSCI 420 Computer Graphics Lecture 17 Spatial Data Structures Jernej Barbic University of Southern California Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees [Angel Ch. 8] 1 Ray Tracing Acceleration

More information

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo Computer Graphics Bing-Yu Chen National Taiwan University The University of Tokyo Hidden-Surface Removal Back-Face Culling The Depth-Sort Algorithm Binary Space-Partitioning Trees The z-buffer Algorithm

More information

Parallel Physically Based Path-tracing and Shading Part 3 of 2. CIS565 Fall 2012 University of Pennsylvania by Yining Karl Li

Parallel Physically Based Path-tracing and Shading Part 3 of 2. CIS565 Fall 2012 University of Pennsylvania by Yining Karl Li Parallel Physically Based Path-tracing and Shading Part 3 of 2 CIS565 Fall 202 University of Pennsylvania by Yining Karl Li Jim Scott 2009 Spatial cceleration Structures: KD-Trees *Some portions of these

More information

A Probabilistic Analysis of Trie-Based Sorting of Large Collections of Line Segments in Spatial Databases. February 17, 2000

A Probabilistic Analysis of Trie-Based Sorting of Large Collections of Line Segments in Spatial Databases. February 17, 2000 A Probabilistic Analysis of Trie-Based Sorting of Large Collections of Line Segments in Spatial Databases ichael Lindenbaum Computer Science Department Technion 32000 Haifa, ISRAEL Hanan Samet Gisli R.

More information

Programming Assignment 1: A Data Structure For VLSI Applications 1

Programming Assignment 1: A Data Structure For VLSI Applications 1 Fall 2016 CMSC 420 Hanan Samet Programming Assignment 1: A Data Structure For VLSI Applications 1 Abstract In this assignment you are required to implement an information management system for handling

More information

Spatial Data Structures

Spatial Data Structures CSCI 480 Computer Graphics Lecture 7 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids BSP Trees [Ch. 0.] March 8, 0 Jernej Barbic University of Southern California http://www-bcf.usc.edu/~jbarbic/cs480-s/

More information

CMSC 425: Lecture 10 Geometric Data Structures for Games: Index Structures Tuesday, Feb 26, 2013

CMSC 425: Lecture 10 Geometric Data Structures for Games: Index Structures Tuesday, Feb 26, 2013 CMSC 2: Lecture 10 Geometric Data Structures for Games: Index Structures Tuesday, Feb 2, 201 Reading: Some of today s materials can be found in Foundations of Multidimensional and Metric Data Structures,

More information

Code Transformation of DF-Expression between Bintree and Quadtree

Code Transformation of DF-Expression between Bintree and Quadtree Code Transformation of DF-Expression between Bintree and Quadtree Chin-Chen Chang*, Chien-Fa Li*, and Yu-Chen Hu** *Department of Computer Science and Information Engineering, National Chung Cheng University

More information

CMSC 754 Computational Geometry 1

CMSC 754 Computational Geometry 1 CMSC 754 Computational Geometry 1 David M. Mount Department of Computer Science University of Maryland Fall 2005 1 Copyright, David M. Mount, 2005, Dept. of Computer Science, University of Maryland, College

More information

Data Organization and Processing

Data Organization and Processing Data Organization and Processing Spatial Join (NDBI007) David Hoksza http://siret.ms.mff.cuni.cz/hoksza Outline Spatial join basics Relational join Spatial join Spatial join definition (1) Given two sets

More information

Computer Graphics. Bing-Yu Chen National Taiwan University

Computer Graphics. Bing-Yu Chen National Taiwan University Computer Graphics Bing-Yu Chen National Taiwan University Visible-Surface Determination Back-Face Culling The Depth-Sort Algorithm Binary Space-Partitioning Trees The z-buffer Algorithm Scan-Line Algorithm

More information

Mesh Generation. Quadtrees. Geometric Algorithms. Lecture 9: Quadtrees

Mesh Generation. Quadtrees. Geometric Algorithms. Lecture 9: Quadtrees Lecture 9: Lecture 9: VLSI Design To Lecture 9: Finite Element Method To http://www.antics1.demon.co.uk/finelms.html Lecture 9: To Lecture 9: To component not conforming doesn t respect input not well-shaped

More information

CSG obj. oper3. obj1 obj2 obj3. obj5. obj4

CSG obj. oper3. obj1 obj2 obj3. obj5. obj4 Solid Modeling Solid: Boundary + Interior Volume occupied by geometry Solid representation schemes Constructive Solid Geometry (CSG) Boundary representations (B-reps) Space-partition representations Operations

More information

Ray Tracing III. Wen-Chieh (Steve) Lin National Chiao-Tung University

Ray Tracing III. Wen-Chieh (Steve) Lin National Chiao-Tung University Ray Tracing III Wen-Chieh (Steve) Lin National Chiao-Tung University Shirley, Fundamentals of Computer Graphics, Chap 10 Doug James CG slides, I-Chen Lin s CG slides Ray-tracing Review For each pixel,

More information

Solid Modelling. Graphics Systems / Computer Graphics and Interfaces COLLEGE OF ENGINEERING UNIVERSITY OF PORTO

Solid Modelling. Graphics Systems / Computer Graphics and Interfaces COLLEGE OF ENGINEERING UNIVERSITY OF PORTO Solid Modelling Graphics Systems / Computer Graphics and Interfaces 1 Solid Modelling In 2D, one set 2D line segments or curves does not necessarily form a closed area. In 3D, a collection of surfaces

More information

Scalable Network Distance Browsing in Spatial Databases

Scalable Network Distance Browsing in Spatial Databases Scalable Network Distance Browsing in Spatial Databases Hanan Samet Jagan Sankaranarayanan Houman Alborzi Computer Science Department Center for Automation Research Institute for Advanced Computer Studies

More information

Data Structures I. C omputer graphics applications require the manipulation. Hierarchical Data Structures. Hanan Samet University of Maryland

Data Structures I. C omputer graphics applications require the manipulation. Hierarchical Data Structures. Hanan Samet University of Maryland Data Structures I Hierarchical Data Structures Hanan Samet University of Maryland Robert E. Webber Rutgers University This is the first part of a two-part overview of the use of hierarchical data structures

More information

Accelerating Geometric Queries. Computer Graphics CMU /15-662, Fall 2016

Accelerating Geometric Queries. Computer Graphics CMU /15-662, Fall 2016 Accelerating Geometric Queries Computer Graphics CMU 15-462/15-662, Fall 2016 Geometric modeling and geometric queries p What point on the mesh is closest to p? What point on the mesh is closest to p?

More information

Chapter 3. Sukhwinder Singh

Chapter 3. Sukhwinder Singh Chapter 3 Sukhwinder Singh PIXEL ADDRESSING AND OBJECT GEOMETRY Object descriptions are given in a world reference frame, chosen to suit a particular application, and input world coordinates are ultimately

More information

Multidimensional Indexes [14]

Multidimensional Indexes [14] CMSC 661, Principles of Database Systems Multidimensional Indexes [14] Dr. Kalpakis http://www.csee.umbc.edu/~kalpakis/courses/661 Motivation Examined indexes when search keys are in 1-D space Many interesting

More information

Ray Genealogy. Raytracing: Performance. Bounding Volumes. Bounding Volume. Acceleration Classification. Acceleration Classification

Ray Genealogy. Raytracing: Performance. Bounding Volumes. Bounding Volume. Acceleration Classification. Acceleration Classification Raytracing: Performance OS 4328/5327 Scott. King Ray Genealogy 1 Ray/pixel at 1k 1k image = 1M? rays rays. Say on avg. 6 secondary rays = 7M?rays rays 100k objects with 10 ops for intersection =? Operations

More information

ISSUES IN SPATIAL DATABASES AND GEOGRAPHICAL INFORMATION SYSTEMS (GIS) HANAN SAMET

ISSUES IN SPATIAL DATABASES AND GEOGRAPHICAL INFORMATION SYSTEMS (GIS) HANAN SAMET zk0 ISSUES IN SPATIAL DATABASES AND GEOGRAPHICAL INFORMATION SYSTEMS (GIS) HANAN SAMET COMPUTER SCIENCE DEPARTMENT AND CENTER FOR AUTOMATION RESEARCH AND INSTITUTE FOR ADVANCED COMPUTER STUDIES UNIVERSITY

More information

Announcements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday

Announcements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday Announcements Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday 1 Spatial Data Structures Hierarchical Bounding Volumes Grids Octrees BSP Trees 11/7/02 Speeding Up Computations

More information

Lecture 17: Solid Modeling.... a cubit on the one side, and a cubit on the other side Exodus 26:13

Lecture 17: Solid Modeling.... a cubit on the one side, and a cubit on the other side Exodus 26:13 Lecture 17: Solid Modeling... a cubit on the one side, and a cubit on the other side Exodus 26:13 Who is on the LORD's side? Exodus 32:26 1. Solid Representations A solid is a 3-dimensional shape with

More information

More Hidden Surface Removal

More Hidden Surface Removal Lecture 8 More Hidden Surface Removal Efficient Painter - binary space partition (BSP) tree Efficient Ray Casting - spatial partitioning (uniform, octrees) - bounding volumes Recall last lecture... front

More information

Solid Modeling. Thomas Funkhouser Princeton University C0S 426, Fall Represent solid interiors of objects

Solid Modeling. Thomas Funkhouser Princeton University C0S 426, Fall Represent solid interiors of objects Solid Modeling Thomas Funkhouser Princeton University C0S 426, Fall 2000 Solid Modeling Represent solid interiors of objects Surface may not be described explicitly Visible Human (National Library of Medicine)

More information

Collision and Proximity Queries

Collision and Proximity Queries Collision and Proximity Queries Dinesh Manocha (based on slides from Ming Lin) COMP790-058 Fall 2013 Geometric Proximity Queries l Given two object, how would you check: If they intersect with each other

More information

Space-based Partitioning Data Structures and their Algorithms. Jon Leonard

Space-based Partitioning Data Structures and their Algorithms. Jon Leonard Space-based Partitioning Data Structures and their Algorithms Jon Leonard Purpose Space-based Partitioning Data Structures are an efficient way of organizing data that lies in an n-dimensional space 2D,

More information

Average case analysis of dynamic geometric optimization

Average case analysis of dynamic geometric optimization Average case analysis of dynamic geometric optimization David Eppstein Department of Information and Computer Science University of California, Irvine, CA 92717 May 19, 1995 Abstract We maintain the maximum

More information

1. Meshes. D7013E Lecture 14

1. Meshes. D7013E Lecture 14 D7013E Lecture 14 Quadtrees Mesh Generation 1. Meshes Input: Components in the form of disjoint polygonal objects Integer coordinates, 0, 45, 90, or 135 angles Output: A triangular mesh Conforming: A triangle

More information

9. Three Dimensional Object Representations

9. Three Dimensional Object Representations 9. Three Dimensional Object Representations Methods: Polygon and Quadric surfaces: For simple Euclidean objects Spline surfaces and construction: For curved surfaces Procedural methods: Eg. Fractals, Particle

More information

VIII. Visibility algorithms (II)

VIII. Visibility algorithms (II) VIII. Visibility algorithms (II) Hybrid algorithsms: priority list algorithms Find the object visibility Combine the operations in object space (examples: comparisons and object partitioning) with operations

More information

Spatial Data Structures for Computer Graphics

Spatial Data Structures for Computer Graphics Spatial Data Structures for Computer Graphics Page 1 of 65 http://www.cse.iitb.ac.in/ sharat November 2008 Spatial Data Structures for Computer Graphics Page 1 of 65 http://www.cse.iitb.ac.in/ sharat November

More information

Multidimensional Data and Modelling - DBMS

Multidimensional Data and Modelling - DBMS Multidimensional Data and Modelling - DBMS 1 DBMS-centric approach Summary: l Spatial data is considered as another type of data beside conventional data in a DBMS. l Enabling advantages of DBMS (data

More information

3D Representation and Solid Modeling

3D Representation and Solid Modeling MCS 585/480 Computer Graphics I 3D Representation and Solid Modeling Week 8, Lecture 16 William Regli and Maxim Peysakhov Geometric and Intelligent Computing Laboratory Department of Computer Science Drexel

More information

Spatial Data Management

Spatial Data Management Spatial Data Management [R&G] Chapter 28 CS432 1 Types of Spatial Data Point Data Points in a multidimensional space E.g., Raster data such as satellite imagery, where each pixel stores a measured value

More information

3D Modeling: Solid Models

3D Modeling: Solid Models CS 430/536 Computer Graphics I 3D Modeling: Solid Models Week 9, Lecture 18 David Breen, William Regli and Maxim Peysakhov Geometric and Intelligent Computing Laboratory Department of Computer Science

More information

Collision Detection. These slides are mainly from Ming Lin s course notes at UNC Chapel Hill

Collision Detection. These slides are mainly from Ming Lin s course notes at UNC Chapel Hill Collision Detection These slides are mainly from Ming Lin s course notes at UNC Chapel Hill http://www.cs.unc.edu/~lin/comp259-s06/ Computer Animation ILE5030 Computer Animation and Special Effects 2 Haptic

More information

Roadmap DB Sys. Design & Impl. Reference. Detailed roadmap. Spatial Access Methods - problem. z-ordering - Detailed outline.

Roadmap DB Sys. Design & Impl. Reference. Detailed roadmap. Spatial Access Methods - problem. z-ordering - Detailed outline. 15-721 D Sys. Design & Impl. Z-ordering Christos Faloutsos www.cs.cmu.edu/~christos Roadmap 1) Roots: System R and Ingres 2) Implementation: buffering, indexing, q-opt 3) Transactions: locking, recovery

More information

CS535 Fall Department of Computer Science Purdue University

CS535 Fall Department of Computer Science Purdue University Spatial Data Structures and Hierarchies CS535 Fall 2010 Daniel G Aliaga Daniel G. Aliaga Department of Computer Science Purdue University Spatial Data Structures Store geometric information Organize geometric

More information

Spatial Data Management

Spatial Data Management Spatial Data Management Chapter 28 Database management Systems, 3ed, R. Ramakrishnan and J. Gehrke 1 Types of Spatial Data Point Data Points in a multidimensional space E.g., Raster data such as satellite

More information

SOME 024: Computer Aided Design. E. Rozos

SOME 024: Computer Aided Design. E. Rozos SOME 024: Computer Aided Design E. Rozos Introduction to CAD theory part 2 Lesson structure Why Solid modelling Solid modelling methods Representation based Manufacturing based Solid modelling storage

More information

(Refer Slide Time: 00:02:00)

(Refer Slide Time: 00:02:00) Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 18 Polyfill - Scan Conversion of a Polygon Today we will discuss the concepts

More information

Advanced Data Types and New Applications

Advanced Data Types and New Applications Advanced Data Types and New Applications These slides are a modified version of the slides of the book Database System Concepts (Chapter 24), 5th Ed., McGraw-Hill, by Silberschatz, Korth and Sudarshan.

More information

Image Rotation Using Quad Tree

Image Rotation Using Quad Tree 80 Image Rotation Using Quad Tree Aashish Kumar, Lec. ECE Dept. Swami Vivekanand institute of Engneering & Technology, Ramnagar Banur ABSTRACT This paper presents a data structure based technique of rotating

More information

Scene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development

Scene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development Chap. 5 Scene Management Overview Scene Management vs Rendering This chapter is about rendering

More information

CPSC / Sonny Chan - University of Calgary. Collision Detection II

CPSC / Sonny Chan - University of Calgary. Collision Detection II CPSC 599.86 / 601.86 Sonny Chan - University of Calgary Collision Detection II Outline Broad phase collision detection: - Problem definition and motivation - Bounding volume hierarchies - Spatial partitioning

More information

UNIVERSITY OF WATERLOO Faculty of Mathematics

UNIVERSITY OF WATERLOO Faculty of Mathematics UNIVERSITY OF WATERLOO Faculty of Mathematics Exploring the application of Space Partitioning Methods on river segments S.S. Papadopulos & Associates Bethesda, MD, US Max Ren 20413992 3A Computer Science/BBA

More information

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Spatial Data Structures and Speed-Up Techniques Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Spatial data structures What is it? Data structure that organizes

More information

Topic 5: Raster and Vector Data Models

Topic 5: Raster and Vector Data Models Geography 38/42:286 GIS 1 Topic 5: Raster and Vector Data Models Chapters 3 & 4: Chang (Chapter 4: DeMers) 1 The Nature of Geographic Data Most features or phenomena occur as either: discrete entities

More information

CS488. Visible-Surface Determination. Luc RENAMBOT

CS488. Visible-Surface Determination. Luc RENAMBOT CS488 Visible-Surface Determination Luc RENAMBOT 1 Visible-Surface Determination So far in the class we have dealt mostly with simple wireframe drawings of the models The main reason for this is so that

More information

Pedestrian Detection Using Structured SVM

Pedestrian Detection Using Structured SVM Pedestrian Detection Using Structured SVM Wonhui Kim Stanford University Department of Electrical Engineering wonhui@stanford.edu Seungmin Lee Stanford University Department of Electrical Engineering smlee729@stanford.edu.

More information

Lecture 06. Raster and Vector Data Models. Part (1) Common Data Models. Raster. Vector. Points. Points. ( x,y ) Area. Area Line.

Lecture 06. Raster and Vector Data Models. Part (1) Common Data Models. Raster. Vector. Points. Points. ( x,y ) Area. Area Line. Lecture 06 Raster and Vector Data Models Part (1) 1 Common Data Models Vector Raster Y Points Points ( x,y ) Line Area Line Area 2 X 1 3 Raster uses a grid cell structure Vector is more like a drawn map

More information

Vertex-Based (Lath) Representations for Three-Dimensional Objects and Meshes p.1/15

Vertex-Based (Lath) Representations for Three-Dimensional Objects and Meshes p.1/15 Vertex-ased (Lath) Representations for Three-imensional Objects and Meshes Hanan Samet hjs@cs.umd.edu www.cs.umd.edu/ hjs epartment of omputer Science enter for utomation Research Institute for dvanced

More information

! Good algorithms also extend to higher dimensions. ! Curse of dimensionality. ! Range searching. ! Nearest neighbor.

! Good algorithms also extend to higher dimensions. ! Curse of dimensionality. ! Range searching. ! Nearest neighbor. Geometric search: Overview Geometric Algorithms Types of data. Points, lines, planes, polygons, circles,... This lecture. Sets of N objects. Geometric problems extend to higher dimensions.! Good algorithms

More information

11 - Spatial Data Structures

11 - Spatial Data Structures 11 - Spatial Data Structures cknowledgement: Marco Tarini Types of Queries Graphic applications often require spatial queries Find the k points closer to a specific point p (k-nearest Neighbours, knn)

More information

Visible Surface Detection Methods

Visible Surface Detection Methods Visible urface Detection Methods Visible-urface Detection identifying visible parts of a scene (also hidden- elimination) type of algorithm depends on: complexity of scene type of objects available equipment

More information

Digital Image Processing Fundamentals

Digital Image Processing Fundamentals Ioannis Pitas Digital Image Processing Fundamentals Chapter 7 Shape Description Answers to the Chapter Questions Thessaloniki 1998 Chapter 7: Shape description 7.1 Introduction 1. Why is invariance to

More information

Quadrant-Based MBR-Tree Indexing Technique for Range Query Over HBase

Quadrant-Based MBR-Tree Indexing Technique for Range Query Over HBase Quadrant-Based MBR-Tree Indexing Technique for Range Query Over HBase Bumjoon Jo and Sungwon Jung (&) Department of Computer Science and Engineering, Sogang University, 35 Baekbeom-ro, Mapo-gu, Seoul 04107,

More information

This article appeared in a journal published by Elsevier. The attached copy is furnished to the author for internal non-commercial research and

This article appeared in a journal published by Elsevier. The attached copy is furnished to the author for internal non-commercial research and This article appeared in a journal published by Elsevier. The attached copy is furnished to the author for internal non-commercial research and education use, including for instruction at the authors institution

More information

Introduction to Indexing R-trees. Hong Kong University of Science and Technology

Introduction to Indexing R-trees. Hong Kong University of Science and Technology Introduction to Indexing R-trees Dimitris Papadias Hong Kong University of Science and Technology 1 Introduction to Indexing 1. Assume that you work in a government office, and you maintain the records

More information

Styles. In a word processor, styles like font, color, boldface, italics, underlining, or strikeout are associated with regions.

Styles. In a word processor, styles like font, color, boldface, italics, underlining, or strikeout are associated with regions. Chapter 3 Region Algera The fundamental unit of lightweight structure is a contiguous segment of text, called a region. Other names for the same concept are runs, sustrings, and pieces [KM98]. Many features

More information

Typically stored in a static array in C or C++ to exploit known (fast) access function and make rebuilding the heap fast.

Typically stored in a static array in C or C++ to exploit known (fast) access function and make rebuilding the heap fast. CMSC420 Glossary asymptotic complexity analysis for data structures, it s the assessment of the rate of change of either the execution time or the storage requirements, usually as the problem size grows

More information

Ray Tracing with Spatial Hierarchies. Jeff Mahovsky & Brian Wyvill CSC 305

Ray Tracing with Spatial Hierarchies. Jeff Mahovsky & Brian Wyvill CSC 305 Ray Tracing with Spatial Hierarchies Jeff Mahovsky & Brian Wyvill CSC 305 Ray Tracing Flexible, accurate, high-quality rendering Slow Simplest ray tracer: Test every ray against every object in the scene

More information

Clustering CS 550: Machine Learning

Clustering CS 550: Machine Learning Clustering CS 550: Machine Learning This slide set mainly uses the slides given in the following links: http://www-users.cs.umn.edu/~kumar/dmbook/ch8.pdf http://www-users.cs.umn.edu/~kumar/dmbook/dmslides/chap8_basic_cluster_analysis.pdf

More information

γ 2 γ 3 γ 1 R 2 (b) a bounded Yin set (a) an unbounded Yin set

γ 2 γ 3 γ 1 R 2 (b) a bounded Yin set (a) an unbounded Yin set γ 1 γ 3 γ γ 3 γ γ 1 R (a) an unbounded Yin set (b) a bounded Yin set Fig..1: Jordan curve representation of a connected Yin set M R. A shaded region represents M and the dashed curves its boundary M that

More information

hjs SORTING SPATIAL DATA BY SPATIAL OCCUPANCY

hjs SORTING SPATIAL DATA BY SPATIAL OCCUPANCY SORTING SPATIAL DATA BY SPATIAL OCCUPANCY Hanan Samet Center for Automation Research Institute for Advanced Computer Studies Computer Science Department University of Maryland College Park, Maryland 20742,

More information

QUERY PROCESSING AND OPTIMIZATION FOR PICTORIAL QUERY TREES HANAN SAMET

QUERY PROCESSING AND OPTIMIZATION FOR PICTORIAL QUERY TREES HANAN SAMET qt0 QUERY PROCESSING AND OPTIMIZATION FOR PICTORIAL QUERY TREES HANAN SAMET COMPUTER SCIENCE DEPARTMENT AND CENTER FOR AUTOMATION RESEARCH AND INSTITUTE FOR ADVANCED COMPUTER STUDIES UNIVERSITY OF MARYLAND

More information

Accelerated Raytracing

Accelerated Raytracing Accelerated Raytracing Why is Acceleration Important? Vanilla ray tracing is really slow! mxm pixels, kxk supersampling, n primitives, average ray path length of d, l lights, 2 recursive ray casts per

More information

Hierarchical Representations of Collections of Small Rectangles

Hierarchical Representations of Collections of Small Rectangles Hierarchical Representations of Collections of Small Rectangles HANAN SAMET Computer Science Department, Center for Automation Research, and Institute for Advanced Computer Studies, University of Maryland,

More information

Acceleration Data Structures

Acceleration Data Structures CT4510: Computer Graphics Acceleration Data Structures BOCHANG MOON Ray Tracing Procedure for Ray Tracing: For each pixel Generate a primary ray (with depth 0) While (depth < d) { Find the closest intersection

More information

Object-Based and Image-Based Image Representations

Object-Based and Image-Based Image Representations 2 Object-ased and Image-ased Image Representations The representation of spatial objects and their environment is an important issue in applications of computer graphics, game programming, computer vision,

More information

Real-Time Voxelization for Global Illumination

Real-Time Voxelization for Global Illumination Lecture 26: Real-Time Voxelization for Global Illumination Visual Computing Systems Voxelization to regular grid Input: scene triangles Output: surface information at each voxel in 3D grid - Simple case:

More information

9. Visible-Surface Detection Methods

9. Visible-Surface Detection Methods 9. Visible-Surface Detection Methods More information about Modelling and Perspective Viewing: Before going to visible surface detection, we first review and discuss the followings: 1. Modelling Transformation:

More information