5 spatial databases
play

5. Spatial databases Characteristics: The scene of spatial data is - PowerPoint PPT Presentation

5. Spatial databases Characteristics: The scene of spatial data is a geometric space , with some dimensionality (usually 2 or 3). The shape and location are essential components of information Dimension values are most often numeric,


  1. 5. Spatial databases Characteristics: � The scene of spatial data is a geometric space , with some dimensionality (usually 2 or 3). � The shape and location are essential components of information � Dimension values are most often numeric, with some resolution, plus lower and upper bounds. � Application areas: Geographic information systems (GIS), computer-aided design (CAD), graphical user interfaces (GUI), virtual environments, computer games, robotics, animation, etc. Literature: � Güting, R.H.: ”An Introduction to Spatial Database Systems”, VLDB Journal , Vol. 3, 1994, pp. 357-399. � P. Rigaux, M. Scholl, A. Voisard: Spatial Databases, with Application to GIS , Morgan-Kaufmann, 2002 MMDB-5 J. Teuhola 2012 109

  2. Abstract space modeling: Entity-based models Components of spatial objects: identity � description � spatial extent � Classification based on dimensionality: Choice depends on the application viewpoint. � (a) Zero-dimensional objects = points � Object does not have a shape , or it is not considered useful � Area quite small with respect to the embedding space, e.g. cities, buildings, road crossings on a map. � Depends e.g. on the scale of the map. MMDB-5 J. Teuhola 2012 110

  3. Entity-based models (cont.) (b) One-dimensional = line objects � E.g. roads on a map � Main geometric type: polyline, consisting of a finite set of line segments ( edges ), so that each segment endpoint ( vertex ) is shared by exactly two segments, except the two endpoints (if any). � Simple polyline: no intersections. � Closed polyline: endpoints meet. � Any curve can be approximated arbitrarily closely with a polyline. MMDB-5 J. Teuhola 2012 111

  4. Entity-based models (cont.) (c) Two-dimensional = surfacic objects � Represent entities with a non-zero area . � Main geometric type: Polygon = region bounded by a closed polyline. � Convex polygon: For any points A, B ∈ P , line segment AB is fully included in P . (d) Three-dimensional = volumetric objects ( polyhedrons ) (e) Four-dimensional = spatio-temporal objects MMDB-5 J. Teuhola 2012 112

  5. Abstract space modeling: Field-based models � Called also space-based models � The spatial information is considered a continuous (though approximated) field, i.e. a function of coordinates (e.g. x and y ). � Each point of space is associated with one or more attributes. � Examples: � temperature, air pressure, height from sea level etc. at different points on maps, see e.g. http://ilmatieteenlaitos.fi/ � grey-level in a grey-scale digital image � red , green and blue components in a true-color (photographic) digital image MMDB-5 J. Teuhola 2012 113

  6. Representation modes of spatial objects Tessellation mode Cellular decomposition (grid, mesh, tiling, etc.) � Fixed tessellation: regular grid (rastering) � Variable tessellation: different sizes of decomposition units � Regular/irregular tessellation � Default: N x M rectangular (usually square) cells, called pixels � Natural (discrete) representation for field-based data � Entity-based data: one pixel for points, a set of pixels for � polylines and polygons. A more precise representation requires more storage space, � and its processing takes more time. MMDB-5 J. Teuhola 2012 114

  7. Representation modes of spatial objects (cont.) Vector mode Natural for the entity model. � Representation primitives: points and edges � Polygon and polyline are both represented as lists of points � 2 n representations for a polygon with n vertices (selection of starting vertex, clockwise/counterclockwise order) � A region is a set of polygons � Representation may be complemented by restrictions (e.g. to simple polygons) � Representing field-based data in vector mode; Digital Elevation Models (DEM): � Field values only for a subset of points � The rest of the values are interpolated . � Example: Triangulated Irregular Networks (TIN) MMDB-5 J. Teuhola 2012 115

  8. Representation modes of spatial objects (cont.) Half-plane representation � Only a single primitive: half-plane (half-space generally) � Sound mathematical basis � Half-space definition in d -dimensional space: inequality a 1 x 1 + a 2 x 2 + ... + a d x d + a d +1 ≤ 0 � Convex polygon = intersection of a finite number of half-planes. � Polygon = union of a finite number of convex polygons. � Line segment = convex polygon of dimension 1 (intersection of two half lines or rays ) � Polyline = union of some line segments MMDB-5 J. Teuhola 2012 116

  9. Compatibility of models and representations Space model Entity-based Field-based Possible Natural Tessellation Represen- tation Vectors Natural Possible Half-planes Possible Unlikely MMDB-5 J. Teuhola 2012 117

  10. Computational geometry: typical problems � Is a point inside a polygon? � Intersection of line segments � Intersections of polylines � Intersection of polygons � Windowing and clipping with a rectangle � Polygon triangulation � Polygon trapezoidalization � Partitioning of a polygon into convex sub-polygons MMDB-5 J. Teuhola 2012 118

  11. Computational geometry: algorithmic techniques for big problems (a) Incremental algorithms Solve the problem for a small subset of input and add the rest one � by one, maintaining the solution at each step. (b) Divide-and-conquer strategy Divide step : recursively split the task into subproblems, until those � can be solved easily. Conquer step : Merge the subproblem solutions bottom-up into a � global solution. (c) Sweep-line method Decompose the input into vertical strips , so that the information � related to the problem is located on lines separating the strips. MMDB-5 J. Teuhola 2012 119

  12. Storage and retrieval of spatial objects Preliminary issues: � Arbitrary shapes difficult to handle ⇒ Restriction to axis-oriented Minimum Bounding Rectangles (MBR), called also Bounding Boxes (BB). � Dimensions are often transformed to the real interval [0, 1); the whole space is a hypercube, denoted E k . Performance factors: � Selected data structure � Dimensionality of the space � Distribution of objects in space: � density at point P = number of rectangles containing P � global density = maximum of local densities. MMDB-5 J. Teuhola 2012 120

  13. 121 MMDB-5 J. Teuhola 2012 Illustration of MBRs

  14. Query types for spatial objects (1) Exact-match query : Not very common for spatial objects, except in the context of insert. (2) Point query : For a point P ∈ E k , find all rectangles R in the database such that P ∈ R . (3) Rectangle intersection : For a given rectangle S ⊆ E k , find all rectangles R with S ∩ R ≠ ∅ . (4) Rectangle enclosure : For a given rectangle S ⊆ E k , find all rectangles R with S ⊆ R . (5) Rectangle containment : For a given rectangle S ⊆ E k , find all rectangles R with R ⊆ S . (6) Volume query : Given v 1 , v 2 ∈ (0,1) and v 1 ≤ v 2 , find all rectangles with volume within [ v 1 , v 2 ]. (7) Spatial join : For two sets of k -dimensional rectangles, find all related pairs, satisfying a given join condition, such as intersection, enclosure, or containment. MMDB-5 J. Teuhola 2012 122

  15. Illustration of spatial join S4 S2 R1 S1 R2 R3 S3 � Intersection-join of { R1, R2, R3 } and { S1, S2, S3, S4 } is { (R1, S2), (R2, S2), (R3, S3) } MMDB-5 J. Teuhola 2012 123

  16. Transformation approach for organizing sets of spatial objects � k -dim. rectangle can be represented as a 2 k -dimensional point. � Alternatives e.g. in 2-dim. space: (a) ( c x , c y , e x , e y ), where ( c x , c y ) is the center point and e x and e y are the distances of the center from the sides. (b) ( l x , l y , u x , u y ), where ( l x , l y ) is the lower left, and ( u x , u y ) is the upper right corner of the rectangle. � Advantage of alternative (a): Location coordinates c x and c y are distinct from extension coordinates e x and e y . Special case: � 1-dimensional space [0, 1) � Rectangle = Line segment ⊆ [0, 1) � Alternative 2-dimensional representations: (a) ( c, e ) = (center, half of length) (b) ( l, u ) = (lower endpoint, upper endpoint) MMDB-5 J. Teuhola 2012 124

  17. Example of the transformation approach S 3 1 • e L 4 • S 1 • L 3 u S 4 0.5 L 2 • P 1 • S 2 L 1 P 3 • • • P 2 P 4 0 1 0 1 0 1 c l Notes: � When PAMs are applied to transformed representation, they suffer from the empty triangles (so called dead regions ). � The (center, extension) approach can be improved, if we know an upper bound to the rectangle side; the ‘live space’ will look like a trapezoid, and the dead triangles are relatively small. MMDB-5 J. Teuhola 2012 125

  18. Answering queries in the transformation approach � Successful areas for different types of queries can be derived by simple geometric calculations. � Example: 1-dim. rectangles (= line segments) represented as 2- dim. points using the (center, extension) approach; query rectangle S = ( c , e ): 0.5 R ⊇ S e R ∩ S ≠ ∅ R ∩ S ≠ ∅ R ⊆ S R ∩ S = ∅ R ∩ S = ∅ 1 c � Drawback: Close, but different-volume rectangles may be located quite far in 2 k -dimensional space. MMDB-5 J. Teuhola 2012 126

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend