Maintaining Connectivity in Dynamic Multimodal Network Models Project Thunderball
1 Outline Review of network dataset model Full build algorithm Incremental build algorithm Exceptional cases Versioning Assorted demos
2 Network Model: Definition A mechanism for defining and managing a connectivity information for features, objects and relationships in a geodatabase. Feature is graphic representation of a real-world object Line (e.g. freeways and railways) Point (e.g. railway stations)
3 The Network Model is explicitly represented with network elements that are found in a single associated logical network (graph). Three types of network elements Junctions Edges Turns The Underlying Logical Network
4 Line Feature * FID * Geometry Point Feature * FID * Geometry Edge * ID Junction * ID * (x,y) Turn * ID * Attributes n * 2 ** 1..n Network Elements
5 Maintaining Network Connectivity As edits are made to the features in a network model, the logical network becomes stale. Re-establishes connectivity (active behavior) Borrow the dirty area management concept provided by topology. When a feature is modified it creates dirty area Complete correctness is only guaranteed when the network has been rebuilt over all the dirty areas.
6 S3 Example S1 I1 I2 S2 P1 e1e2e3 e4 e5 e6 j1 j8 j7 j6 j5 j4j3=P1 j2 S1 I1 I2 S2 e1e2e3 e4 e5 e6 j1 j8 j7 j6 j5 j4j3=P1 j2 P1
7 Rebuild Algorithms Initial build of a logical network Simply a special case of a rebuild over a dirty region that encompasses the entire network Existing logical network is empty. Incremental Rebuilding Rebuilding region is a subset of the dirty region. When we rebuild the entire dirty region, the resulting logical network is completely correct.
8 Initial build Algorithm: Input The set of connectivity nodes for the entire network. Extracted through connectivity analysis line endpoint interstate (indivisble) street (divisible) mid-span vertex interstate tunnel street bridge Interstate group: Street group: Interstate--Street interconnect: transition point streets connect streets connect interstates connect I1I2 S1 B1 T1 (0,0) I3 S2 S3 S4 P1 interstate connects to street Connectivity Nodes (X,Y)Point FCID, FIDLine FCIDs, FIDs, %'s along (0,0)T1I1/100%; I2/0% (0,0)B1S1/33% (1,0)P1I2/100%; S4/0% (2,0)S4/100% (-1,0)I1/0%; I3/100% (-1,1)I3/0% (0,1)S1/0% (-1,-1)S2/0% (0,-1)S2/50%; S1/67% (1,-1)S2/100% (-1,-2)S3/0% (0,-2)S3/50%; S1/100% (1,-2)S3/100%
9 Connectivity Analysis Extract the geometry of all features in the network dataset. Sort the vertex information in the table by coordinate values so that the coincident vertexes are grouped together Analyze each group of coincident vertexes according to the connectivity model Note: the associated feature geometries are not updated – there is no topological integration (cracking and clustering) being done
10 Initial build Algorithm: Step1 Create junction elements and populate vertex information table from the extracted connectivity nodes 1. For each connectivity node 2. Create a logical junction element and set its x and y coordinate weight values 3. If there is a point feature participating in the connectivity node 4. Associate the junction element with the point feature 5. For each line vertex participating in the connectivity node 6. Add a record to the vertex information table, tagged with the junction element
11 Initial build Algorithm: Step1 Connectivity Nodes (X,Y)Point FCID, FIDLine FCIDs, FIDs, %'s along (0,0)T1I1/100%; I2/0% (0,0)B1S1/33% (1,0)P1I2/100%; S4/0% (2,0)S4/100% (-1,0)I1/0%; I3/100% (-1,1)I3/0% (0,1)S1/0% (-1,-1)S2/0% (0,-1)S2/50%; S1/67% (1,-1)S2/100% (-1,-2)S3/0% (0,-2)S3/50%; S1/100% (1,-2)S3/100% j1j2 j3j6=P1j7 j8j9j10 j11j12j13 j4=T1 j5=B1 Streets S1 67% j3 Vertex Information Table Line FCIDLine FIDRelative PositionJunction EID Streets I3 0% j1Interstate I1 100% j9 Interstate I1 0% j2 StreetsS2 50% j4 StreetsS1 100% j10 Streets S4 100% j11 0% InterstateI3j3 Interstate I20%j4 33%j5 InterstateI2j6 0% StreetsS4100%j7 0%j8 S2 j9StreetsS1 StreetsS2100% StreetsS30% j12StreetsS350% StreetsS1100%j12 j13StreetsS3100%
12 Create edge elements from vertex information table 1. Sort the vertex information table using the line FCID as primary key, line FID as secondary key, and relative position as tertiary key 2. For each adjacent pair of records in the sorted table 3. If the pair involves the same line feature 4. Create a logical edge element between the junction elements specified by the two records Initial build Algorithm: Step2
13 Initial build Algorithm: Step2 e11 e1 e9 e2 e10 e8 e4 e3 e5 e6e7 j1j2 j3j6=P1j7 j8j9 j10 j11j12 j13 j4=T1 j5=B1 Streets S1 67% j3 Sorted Vertex Information Table Line FCIDLine FIDRelative PositionJunction EID Streets I3 0% j1Interstate I1 100% j9 Interstate I1 0% j2 StreetsS2 50% j4 StreetsS1 100% j10 Streets S4 100% j11 0% InterstateI3j3 Interstate I20%j4 33%j5 InterstateI2j6 0% StreetsS4100%j7 0%j8 S2 j9StreetsS1 StreetsS2100% StreetsS30% j12StreetsS350% StreetsS1100%j12 j13StreetsS3100%
14 Incremental rebuild: The idea We can regard the logical network as containing historical connectivity information The goal of the rebuild algorithm is to replace that historical information with current information Done by rebuilds of dirty areas.
15 Incremental Rebuilding In general case the rebuilding region is only part of the dirty region The part of the dirty region that lies outside the rebuilding region as the gray region.
16 Incremental rebuild: input The algorithm requires the following inputs: 1. the set of connectivity nodes in the rebuilding region, 2. the set of line features that intersect the rebuilding region, and 3. a way to test if some (x, y) coordinate falls in the dirty/gray region.
17 Incremental rebuild: Example Connectivity Nodes (X,Y)Point FCID, FIDLine FCIDs, FIDs, %'s along (1,1)P2S1/33%; I1/100%; I2/0% (2,1.5)P1S1/67% (3,1.5)S2/50%; S1/100% (3,1)S2/100% S1 I1 I2 S2 P1 P2
18 For each line feature in the rebuilding region, remove the edge elements associated with the lines inside the dirty area. For the junction elements connected to those edge elements, try to save them for reuse in a vertex information table. Saved junctions not in the dirty region associated with a point feature has connected edge elements in the logical network Incremental rebuild: Step 1
19 Incremental rebuild: Step 1 e1e2e3 e4 e5 e6 j1 j8 j7 j6 j5 j4j3=P1 j2 Saved Vertex Information Table Line FCIDLine FIDRelative PositionJunction EID StreetsS10%j1 InterstateI2100%j5 InterstateI10%j7 StreetsS20%j8 j1 j8 j7 j5 j3=P1
20 For each connectivity node in the rebuilding region, create a logical junction element if necessary and add information to a new vertex information table. If the connectivity node contains a point feature and the point feature does not have an associated logical junction element – create one. Otherwise update the x and y coordinates. Incremental rebuild: Step 2
21 Incremental rebuild: Step 2 StreetsS167%j3 New Vertex Information Table Line FCIDLine FIDRelative PositionJunction EID StreetsS133%j9 InterstateI1100%j9 InterstateI20%j9 StreetsS250%j10 StreetsS1100%j10 StreetsS2100%j11 j1 j8 j7 j5 j3=P1 j9=P2 j10 j11 Connectivity Nodes (X,Y)Point FCID, FIDLine FCIDs, FIDs, %'s along (1,1)P2S1/33%; I1/100%; I2/0% (2,1.5)P1S1/67% (3,1.5)S2/50%; S1/100% (3,1)S2/100% j3=P1
22 Create edge elements by processing the two vertex information tables The two tables are merged and sorted For each adjacent pair of records in the sorted table if it involves vertexes from the same feature we create edge. Incremental rebuild: Step 3
23 Incremental rebuild: Step 3 StreetsS167%j3 New Vertex Information Table Line FCIDLine FIDRelative PositionJunction EID StreetsS133%j9 InterstateI1100%j9 InterstateI20%j9 StreetsS250%j10 StreetsS1100%j10 StreetsS2100%j11 Saved Vertex Information Table Line FCIDLine FIDRelative PositionJunction EID StreetsS10%j1 InterstateI2100%j5 InterstateI10%j7 StreetsS20%j8 Vertex Information Table Line FCIDLine FIDRelative PositionJunction EID StreetsS10%j1 InterstateI2100%j5 InterstateI10%j7 StreetsS20%j8 StreetsS167%j3 StreetsS133%j9 InterstateI1100%j9 InterstateI20%j9 StreetsS250%j10 StreetsS2100%j11 StreetsS1100%j10 + =
24 Incremental rebuild: Step 3 Vertex Information Table Line FCIDLine FIDRelative PositionJunction EID StreetsS10%j1 InterstateI2100%j5 InterstateI10%j7 StreetsS20%j8 StreetsS167%j3 StreetsS133%j9 InterstateI1100%j9 InterstateI20%j9 StreetsS250%j10 StreetsS2100%j11 StreetsS1100%j10 j1 j8 j7 j5 j3=P1 e9 e7 e13 e12 e10 j9=P2 e8 e11 j10 j11
25 Logical network Partial Incremental Rebuilds Here we have “partial” line features, i.e., line features that intersect both the rebuilding region and the gray region. For each line feature that intersects the rebuilding region, information about its endpoints in the gray region is added to the set of input connectivity nodes. j1 j2 e1 Logical network S1
26 Rebuilding Turn Features Problem: Turn features have optional geometry. It is difficult to determine if a turn feature is inside the rebuild region or not. Solution: Introduce the notion for dirty object and use it for the turn features Dirty object: object whose modification has not been propagated to the logical network
27 Logical network Dirty Objects When a feature is modified his classID and objectID are stored in Dirty Feature Table. During the rebuild process all objects inside the Dirty Feature Table are recreated in the Logical Network e1 e2 e3 e4 j1 Turn id Jnct. id Edge id t1 j1e4e2 Logical Turn Table Rec id Class id Obj id Subid 1 tc1tf10 Dirty Object Table e1 e2 e3 e4 j1 Turn id Jnct. id Edge id Logical Turn Table Rec id Class id Obj id Subid 1 tc1tf10 Dirty Object Table t1 j1e4e2e3 Logical network S1 S2 tf1 S1 S2 tf1
28 Rebuilding Turn Features Marking turn as a dirty When the turn feature is directly modified (Insert, Update, Delete) When the associated line features are modified (Update, Delete) When the associated logical turn element is deleted (This happens during the rebuild process) Rebuilding the dirty turn features: Every time when the Network Dataset is rebuild there is attempt to rebuild all turn features
29 Questions?