Creating a Transport Network

In this example, the Actions are used to create a "transport network" containing roads, railways, and stations, using Network Graphs.

We construct this network graph in stages, using multiple Actions and applying name parameters when adding features to differentiate between the current object and what it is being compared to.

The first Action will add Roads to the transport network.

Part 1 of an Action that add roads to a transport network.Adds the root Road object and loops over the other Road objects
Part 2 of an Action that add roads to a transport network.
Checks that the road being checked touches the root road object, then adds them both to the network
A map showing a road network.
Map displaying roads

The second Action does the same thing for the Railways.

Part 1 of an Action that add railways to a transport network.
Adds the root Railway object and loops over the other Railway objects
Part 2 of an Action that add railways to a transport network.
Checks that the railway being checked touches the root railway object, then adds them both to the existing network
A map showing the transport network as before now including a trainline.
Map displaying roads and railways

The third Action, creates Stations where the Roads and Railways intersect.

Part 1 of an Action that add stations to a transport network.
Adds the root Station object
Part 2 of an Action that add stations to a transport network.
Checks that the Station object intersects the Railway object, then connects them together
Part 3 of an Action that add stations to a transport network.
Checks that the Station object intersects the Railway object, then connects them together
A repeat of the map featuring roads, train lines and a station.
Map displaying roads, railways and stations