- Nodes not directly on the network such as zone centroids — covered in the next section — or individual origins and destinations such as houses and workplaces.
- Nodes that are a part of transport networks, representing individual pathways, intersections between pathways (junctions) and points for entering or exiting a transport network such as bus stops and train stations.
Transport networks can be represented as graphs, in which each segment is connected (via edges representing geographic lines) to one or more other edges in the network.Nodes outside the network can be added with “centroid connectors”, new route segments to nearby nodes on the network (Hollander ).72Every node in the network is then connected by one or more ‘edges’ that represent individual segments on the network.We will see how transport networks can be represented as graphs in Section .
Public transport stops are particularly important nodes that can be represented as either type of node: a bus stop that is part of a road, or a large rail station that is represented by its pedestrian entry point hundreds of meters from railway tracks.We will use railway stations to illustrate public transport nodes, in relation to the research question of increasing cycling in Bristol.These stations are provided by spDataLarge in .
- The public transport leg, which typically goes from the station nearest a trip’s origin to the station nearest its destination.
- The destination leg, from the station of alighting to the destination.
Building on the analysis conducted in Section 12.4, public transport nodes can be used to construct three-part desire lines for trips that can be taken by bus and (the mode used in this example) rail.The first stage is to identify the desire lines with most public transport travel, which in our case is easy because our previously created datasetdesire_lines
already contains a variable describing the number of trips by train (the public transport potential could also be estimated using public transport routing services such as ).To make the approach easier to follow, we will select only the top three desire lines in terms of rails use:
The challenge now is to ‘break-up’ each of these lines into three pieces, representing travel via public transport nodes.This can be done by converting a desire line into a multiline object consisting of three line geometries representing origin, public transport and destination legs of the trip.This operation can be divided into three stages: matrix creation (of origins, destinations and the ‘via’ points representing rail stations), identification of nearest neighbors and conversion to multilines.These are undertaken by line_via()
.This stplanr function takes input lines and points and returns a copy of the desire lines — see the Desire Lines Extended vignette on the geocompr.github.io website and for details on how this works.The output is the same as the input line, except it has new geometry columns representing the journey via public transport nodes, as demonstrated below:
#> [1] 10
#> [1] 13
Figure 12.4: Station nodes (red dots) used as intermediary points that convert straight desire lines with high rail usage (black) into three legs: to the origin station (red) via public transport (gray) and to the destination (a very short blue line).