Spatial Databases Representation Spring 2017 KiJoune Li PNU
Spatial Databases - Representation Spring, 2017 Ki-Joune Li
PNU STEM Spatial Databases n Entity-Based Databases vs. Field-Based Databases ¨ Entity-Based Databases n n ¨ Set of Spatial Objects Non-Spatial Attributes for each object Field-Based Databases n n No clear boundary of an object No non-spatial attributes 2
PNU STEM Entity-Based Spatial Databases n Feature: Meaningful Spatial Entity ¨ Example n n ¨ Each feature has n n Geometry OID Non-spatial Attributes Spatial Database ¨ ¨ n Building: a meaningful entity Edge: a spatial piece Set of Features Set of Relationships between Features Representation of Geometry ¨ ¨ ¨ Raster Model Vector Model Constrained Representation 3
PNU STEM Representation of Geometry: Raster Model n Raster Model A geometric object: set of pixels or tessels (mosaics) ¨ A value is assigned to each pixel ¨ n Example Pollution Area Non-Pollution Area n Pros and Cons Pros Cons 1. Simple 2. Easy to Collect Example: Satellite Image 1. Huge 2. Difficult to manipulate Example: Rotation, Zooming 4
PNU STEM Irregular Tessellation n Regular Raster Model Huge Size of Data ¨ To reduce the size, Irregular Tessellation ¨ n Irregular Tessellation Irregular Size ¨ Irregular Shape ¨ n Irregular Size K-D tree ¨ Quadtree ¨ n n Region Quadtree Point Quadtree 5
PNU STEM K-D tree n Partitioning of a space bipartition ¨ X-axis and Y-axis alternatively ¨ x 1 < > y 1 x 12 y 12 x 11 x 1 6
PNU STEM Quadtree n Extension of KD-tree: binary split ¨ Quadtree 4 -way equi-split instead ¨ Quadrant ¨ 7
PNU STEM Point Quadtree n A variation of quadtree Center of division is given by (x, y) ¨ More flexible than region quadtree ¨ p 2 p 1 p 3 p 2 n p 3 Analysis by quadtree Area computation ¨ Difference ¨ 8
PNU STEM Linear Quadtree n Linearization of Quadtree Transformation of 2 -D space to 1 -D space ¨ By Space Filling Curve ¨ 11 6 13 N-order n Hilbert Column-wise Peano key is assigned to each quadrant 9
PNU STEM Linear Quadtree n N-order Peano Key ¨ Bit Interleaving Method 11 1. Binary representation of coordinates (10, 01) 10 2. Bit-Interleaving x=1 0 y= 0 1 01 00 Peano key 00 01 10 =1 0 0 1 =9 11 10
PNU STEM Linear Quadtree n Each Quadrant Represented by (kpeano, size) ¨ Size: ¨ Size 2 2 n split Size 1 Size 0 n Object is represented by a set of pairs (k, s) 11
PNU STEM Vector Model n Geometric object is represented by its ¨ n Coordinates (x, y), or (x, y, z) Geometric type Point (x, y) ¨ Line (x 1, y 1, x 2, y 2) or (p 1, p 2) ¨ Polyline (x, y)* or p* ¨ Polygon: Closed polyline ¨ 12
PNU STEM Example: OGC Simple Feature Geometry 13
PNU STEM Database Schema for Vector Model n By Relational Data Model Point and Line: No problem ¨ Polyline, Polygon ¨ n 1 st Normal Form of relational model ¨ ¨ n Atomic type only Set type is not allowed Polyline: ordered set of points Geo-relational model: Based on Winged-Edge Topology By Object-Oriented Data Model or OR Model Provide Set type ¨ Provide Polygon, Polyline Type ¨ 14
PNU STEM Winged Edge Representation n Example 15
PNU STEM Winged Edge Representation: Topology Point # Face Topology Start Line # Face # Start Line # Left Line End Point Start Point Right Line Topology Line # Starting Point # Ending Point # Left Line # Right Line # Left Face # Right Face # 16
PNU STEM Winged Edge Representation: Geometry Line Geometry Table Line # n Starting Point Intermediate Points Ending Point Why Line-Oriented Representation ? 17
- Slides: 17