Spatial Databases - Topology Spring, 2017 Ki-Joune Li
Spaghetti Model The Most Simple Representation by Vector Model Point Table Line Table P1 (30,70) L1 P4 (20,60) L4 L5 L3 P3 (20,50) P2 (40,50) L2 Point# x y p1 30 70 p2 40 50 p3 20 p4 60 Line # x1 y1 x2 y2 L1 30 70 40 50 L2 20 L3 60 L4 L5
Spaghetti Model Example: DXF Program Assignment #1 A CAD Data Format by Spaghetti Model Representation of geometric properties not spatial or geographic ones 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 23th
Problem of Spaghetti Model: Example When P1 moves to (40,80), Ambiguity P1 (40,80) P1 (30,70) L4 L1 P4 (20,60) L5 ? L3 40, 80 P3 (20,50) P2 (40,50) L2 Point# x y p1 30 70 p2 40 50 p3 20 p4 60 Line # x1 y1 x2 y2 L1 30 70 40 50 L2 20 L3 60 L4 L5 40, 80
Problem of Spaghetti Model: Example To make it clear Relationship between Point and Line Line # ps pe L1 p1 p2 L2 p3 L3 p4 L4 L5 Point# x y p1 30 70 p2 40 50 p3 20 p4 60 p5 40, 80 No change of line table P2 (40,50) P3 (20,50) P4 (20,60) L5 L2 L3 L1 L4 P1 (40,80) P5 (30,70)
Problem of Spaghetti Model: Example No clear information about the connection without additional data L1:L3 ? or L1:L2 P2 L1 : 3,300V P1 L2 : 220V P3 P5 L4 : 220V L3 : 3,300V P4 Point# x y p1 30 70 p2 40 50 p3 20 p4 60 p5 80 Line # x1 y1 x2 y2 L1 30 70 40 50 L2 L3 20 L4 60 Point# x y p1 30 70 p6 p2 40 50 p3 20 p4 60 p5 Line # ps pe L1 p1 p2 L2 p6 p5 L3 p4 L4 p3 Need Topological Information
Topology Topology Topological Equivalence (Homeomorphism) Invariant properties during elastic transformation (rubber sheeting) Relationship between Spatial Objects Topological Equivalence (Homeomorphism) l1 l2 l3 l4 l5 l1 l2 l3 l4 l5
Some Definitions of Topology 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 Boundary: Set of all points that have neighbors within A and neighbors within AC at the same time Interior and Exterior Neighbor of p p Boundary of A neighbors in A, neighbors in AC A AC
Examples of Topologies B A B A B Disjoint(A,B) Meet(A,B) Overlap(A,B) A B B A, B A Some complicated cases ? Cover(A,B) or CoveredBy(B,A) Contain(A,B) or Inside(B,A) Equal(A,B) A 8 Relationships B Topology between Lines ?
Representation of Topology by 9-IM 9-Intersection Model Example Extensions of 9-IM A + B + A 0 B + A - B + A + B 0 A 0 B 0 A - B 0 A+ B - A 0 B - A - B - R(A,B)= 1 A B R(A,B)=
Built-In Topology: Topology Levels By VPF (Vector Product Format): A Military Standard VPF NATO Standard CEN/TC287 ISO/TC211 Level 0: No topology (Spaghetti Model) Level 1 Level 2 Level 3: Face topology Less Topology More Topology
Topology Level 1: Connectivity Description of connectivity between lines l1 is connected with l2. Example Pipeline network No Planarity restriction l1 l2 l3 p1 p2 p3
Topology Level 2: Connectivity + Planarity Topology Level 1 + Planarity Condition Planarity Only ONE object at a position No overlapping is allowed Example: ? p3 p3 l21 l12 p2 p2 l11 p5 l1 p1 p1 l2 l22 p4 p4 Level 2 Level 1 (not Level 2)
Topology Level 3: Face Topology Adjacency between faces Left / Right Face of a line Example B C A Original Boundary B C A B C A Without Face Topology With Face Topology
How to maintain the Planarity of Faces Example 1 Example 2 Original Faces F2 New Face to respect the planarity F1 F3 F2 F1 New Inserted Line
Simple Data Modeling of Topology Starting Pt 1..1 Point (Node) (X,Y) Line (Edge) Point String Connected Line 1..* Ending Pt 1..1 Connected Line 1..* Topology Level 1, 2 Left Face 1..1 Right Face 1..1 Face Boundary 1..* Boundary 1..* Topology Level 3 Face with Holes ? Outer Ring Inner Ring