170 likes | 376 Views
Spatial Databases - Quiz. Spring, 2007 Ki-Joune Li. Quiz-Quadtree. For a quatree T and a polygon P , p is the perimeter (in pixel width) of P , and T has 2 n x2 n pixels. Then What is the least upper bound on the number of nodes in T ? Describe it in big-O notation.
E N D
Spatial Databases- Quiz Spring, 2007 Ki-Joune Li
Quiz-Quadtree For a quatree T and a polygon P, p is the perimeter (in pixel width) of P, and T has 2nx2n pixels. Then • What is the least upper bound on the number of nodes in T ? Describe it in big-O notation.
Entity-Based Spatial Databases • Feature: Meaningful Spatial Entity • Example • Building: a meaningful entity • Edge: a spatial piece • Each feature has • Geometry • OID • Non-spatial Attributes • Spatial Database • Set of Features • Set of Relationships between Features • Representation of Geometry • Raster Model • Vector Model • Constrained Representation
Representation of Geometry: Raster Model • Raster Model • A geometric object: set of pixels or tessels (mosaics) • A value is assigned to each pixel • Example • Pros and Cons Pollution Area Non-Pollution Area
Irregular Tessellation • Regular Raster Model • Huge Size of Data • To reduce the size, Irregular Tessellation • Irregular Tessellation • Irregular Size • Irregular Shape • Irregular Size • K-D tree • Quadtree • Region Quadtree • Point Quadtree
K-D tree • Partitioning of a space • bipartition • X-axis and Y-axis alternatively x1 < > y1 x12 y12 x11 x12 y1 y12 x11 x1
Quadtree • Extension of KD-tree: • KD-tree: binary split • Quadtree 4-way equi-split instead • Quadrant
Point Quadtree • A variation of quadtree • Center of division is given by (x,y) • More flexible than region quadtree • Analysis by quadtree • Area computation • Difference p1 p2 p1 p3 p2 p3
Linear Quadtree • Linearization of Quadtree • Transformation of 2-D space to 1-D space • By Space Filling Curve • Peano key is assigned to each quadrant 11 6 13 Hilbert Column-wise N-order
Peano key = 1 0 0 1 Linear Quadtree • N-order Peano Key • Bit Interleaving Method 11 1. Binary representation of coordinates (10,01) 2. Bit-Interleaving x = 1 0 y = 0 1 10 01 00 = 9 00 01 10 11
Linear Quadtree • Each Quadrant • Represented by (kpeano, size) • Size: • Object is represented by a set of pairs (k,s) Size 2 2nsplit Size 1 Size 0
Vector Model • Geometric object is represented by its • Coordinates (x,y), or (x,y,z) • Geometric type • Point (x,y) • Line (x1,y1,x2,y2) or (p1, p2) • Polyline (x,y)* or p* • Polygon: Closed polyline
Database Schema for Vector Model • By Relational Data Model • Point and Line: No problem • Polyline, Polygon • 1st Normal Form of relational model • 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
Winged Edge Representation • Example
Winged Edge Representation: Topology Point Topology Face Topology Point # Start Line # Face # Start Line # Left Line End Point Start Point Right Line Line Topology Line # Starting Point # Ending Point # LeftLine # RightLine # LeftFace # RightFace #
Winged Edge Representation: Geometry • Why Line-Oriented Representation ? Line Geometry Table Line # Starting Point Intermediate Points Ending Point