Spatial Databases Topology Spring 2017 KiJoune Li PNU
Spatial Databases - Topology Spring, 2017 Ki-Joune Li
PNU STEM Spaghetti Model n The Most Simple Representation by Vector Model P 1 (30, 70) L 1 P 4 (20, 60) L 5 L 4 L 3 P 3 (20, 50) ¨ Point Table Point# x L 2 P 2 (40, 50) Line Table y Line # x 1 y 1 x 2 y 2 p 1 30 70 L 1 30 70 40 50 p 2 40 50 L 2 40 50 20 50 p 3 20 50 L 3 20 50 20 60 p 4 20 60 L 4 20 60 30 70 L 5 20 60 40 50 2
PNU STEM Spaghetti Model n Example: DXF A CAD Data Format by Spaghetti Model ¨ Representation of geometric properties not spatial or geographic ones ¨ n Program Assignment #1 ¨ ¨ ¨ Decode given data file in DXF Define schema of Oracle spatial DB Insert objects into DB Programming Environment: JDBC + Oracle SDO Due data: by April 23 th 3
PNU STEM Problem of Spaghetti Model: Example n When P 1 moves to (40, 80), P 1 (30, 70) P 1 (40, 80) L 4 P 4 (20, 60) L 5 L 1 ? L 3 P 3 (20, 50) Ambiguity 40, 80 P 2 (40, 50) L 2 Point# x y Line # x 1 y 1 x 2 y 2 p 1 30 70 L 1 30 70 40 50 p 2 40 50 L 2 40 50 20 50 p 3 20 50 L 3 20 50 20 60 p 4 20 60 L 4 20 60 30 70 L 5 20 60 40 50 40, 80 4
PNU STEM Problem of Spaghetti Model: Example n To make it clear Point# x y Line # ps pe p 1 30 70 L 1 p 2 p 2 40 50 L 2 p 3 p 3 20 50 L 3 p 4 p 4 20 60 L 4 p 1 p 5 30 70 L 5 p 4 p 2 40, 80 No change of line table n Relationship between Point and Line P 5 (30, 70) P 1 (40, 80) L 4 P 4 (20, 60) L 5 L 1 L 3 P 3 (20, 50) L 2 P 2 (40, 50) 5
PNU STEM Problem of Spaghetti Model: Example n No clear information about the connection without additional data P 2 ¨ L 1 : 3, 300 V L 1: L 3 ? or L 1: L 2 P 3 L 4 : 220 V P 1 L 2 : 220 V P 5 L 3 : 3, 300 V P 4 Point# x y Line # x 1 y 1 x 2 y 2 Point# x y Line # ps pe p 1 30 70 L 1 30 70 40 50 p 1 30 70 L 1 p 2 p 2 40 50 L 2 30 70 50 50 p 6 30 70 L 2 p 6 p 5 p 3 20 50 L 3 20 50 30 70 p 2 40 50 L 3 p 4 p 1 p 4 20 60 L 4 20 60 30 70 p 3 20 50 L 4 p 3 p 6 p 5 50 80 p 4 20 60 p 5 30 70 Need Topological Information 6
PNU STEM Topology n Topology Invariant properties during elastic transformation (rubber sheeting) ¨ Relationship between Spatial Objects ¨ n Topological Equivalence (Homeomorphism) l 1 l 5 l 3 l 2 l 4 7
PNU STEM Some Definitions of Topology n Mathematical Definition based on Point Set Theory An area: Defined as an infinite set of points ¨ Neighbor of p: set of all points within a unit disc of p ¨ Neighbor of p p ¨ Boundary: Set of all points that have neighbors within A and neighbors within AC at the same time Boundary of A A ¨ AC neighbors in A, neighbors in AC Interior and Exterior 8
PNU STEM Examples of Topologies B A Disjoint(A, B) A B Cover(A, B) or Covered. By(B, A) B A Meet(A, B) A B Contain(A, B) or Inside(B, A) A B Overlap(A, B) A, B Some complicated cases ? Equal(A, B) A 8 Relationships B Topology between Lines ? 9
PNU STEM Representation of Topology by 9 -IM n 9 -Intersection Model R(A, B)= ¨ A + B + A 0 B + A- B+ A + B 0 A 0 B 0 A - B 0 A+ B - A 0 B - A - B - Example A n B R(A, B)= 1 0 0 1 1 1 Extensions of 9 -IM 10
PNU STEM Built-In Topology: Topology Levels n By VPF (Vector Product Format): A Military Standard ¨ n n VPF NATO Standard CEN/TC 287 ISO/TC 211 Level 0: No topology (Spaghetti Model) Level 1 Level 2 More Topology Level 3: Face topology Less Topology 11
PNU STEM Topology Level 1: Connectivity n Description of connectivity between lines ¨ l 1 n is connected with l 2. Example p 3 p 1 l 1 p 2 l 3 Pipeline network ¨ No Planarity restriction ¨ 12
PNU STEM Topology Level 2: Connectivity + Planarity n Topology Level 1 + Planarity Condition n Planarity Only ONE object at a position ¨ No overlapping is allowed ¨ p 3 p 1 l 1 p 2 p 1 l 2 l 11 p 5 l 22 p 4 Level 1 (not Level 2) ¨ p 2 l 21 l 12 Level 2 Example: ? 13
PNU STEM Topology Level 3: Face Topology n n Topology Level 2 + Face Topology Adjacency between faces ¨ n Left / Right Face of a line Example A B Original Boundary C A B A C Without Face Topology B C With Face Topology 14
PNU STEM How to maintain the Planarity of Faces n Example 1 Original Faces F 1 F 2 New Face to respect the planarity F 1 n F 3 F 2 Example 2 New Inserted Line 15
PNU STEM Simple Data Modeling of Topology Point (Node) (X, Y) Starting Pt 1. . 1 Connected Line 1. . * Line (Edge) Ending Pt 1. . 1 Point String Connected Line 1. . * Topology Level 1, 2 Left Face 1. . 1 Right Face 1. . 1 Face Boundary 1. . * Topology Level 3 • Face with Holes ? Outer Ring Inner Ring 16
- Slides: 16