Trains, pains and automobiles
Here at Geovation we are big fans of trains, but let’s face it – who isn’t!? Tech Team Graduate Rebecca Aspin takes us on a journey exploring the differences in road and rail routes across the UK.
We’ve all been on the receiving end of the dreaded bus replacement service which kicked off a thought, if you were to get on a bus replacement service, which is the worst journey for you to be on?
The Tech Team decided to investigate…
Finding routes between railway stations
To find routes between all railway stations, we need to find datasets of the road and railway networks across Britain. For the road network we used Ordnance Survey’s own Highways data.
For railway lines we used data from https://datashare.ed.ac.uk/handle/10283/2423, which is a legacy dataset derived from OS Open data, and for railway stations we used the OS Zoomstack railway stations layer.
At Geovation we are big advocates of open source software; PostGIS is a fantastic spatial database extension to PostgreSQL and pgRouting is a great tool for extending the capabilities of PostGIS to enable networking analysis. We uploaded the road and railway datasets into a PostgreSQL database to find the shortest possible routes between railway stations.
The first step was to create network topology for our railway network and join the rail network stations and our Zoomstack stations together.
The road network data already had a topology and was suitable for routing. To calculate the shortest distance by road for each pair of railway stations we found the nearest vertex on the road network to each station and then use Dijkstra’s algorithm to find the shortest route between each pair of these vertices.
Finally for each pair of stations we compared the distance by road to the distance by rail to find a ‘road/rail ratio’ describing how many times longer each journey is by road than by rail.
Where are trains much better than roads?
The highest road/rail ratio is found between Culrain and Invershin Stations in the Scottish Highlands. These two stations are only 800m apart but lie on opposite banks of a river, which can be crossed by rail or on foot by the Shin railway Viaduct. However, to complete the same journey by car, a 13km long route is required to find the nearest road bridge!
Rivers are one natural feature which can cause long road journeys, particularly for stations which are close together. But what about stations which are further apart?
For stations over 10km apart the highest road/rail ratio is between Rannoch and Bridge of Orchy stations, also in a remote part of Scotland. Here there are few roads through the mountainous terrain so the journey by car would be over 4 times the length of that by rail.
Train journeys naturally suit greater distances however this is where there can also be the most problems. The next map shows the top 500 routes between stations over 50km apart which are longer by road compared to rail.
Many of these routes are again in rural Scotland, but there are also many routes in more urban areas, including Liverpool and London. You can imagine that with the traffic in these areas road route may be very slow, on top of them already being longer.
What about the opposite problem?
Naturally when we were chatting about it as a group we had to know where are there situations where road travel is actually better than rail?
This would be represented by the lowest road/rail ratio, which is found between Dorking North and Dorking Deepdene Stations. The two railway lines in Dorking which are not connected but the stations are only 400m apart so no would actually want to take this journey!
Again we want to look at longer routes. For stations over 10km the lowest road/rail ratio is for Pickering Station to Malton Station.
These two stations used to be connected by rail until the Malton to Whitby line closed in 1956. The section from Pickering to Whitby has since been reopened as the North York Moors heritage railway but Malton was never reconnected.
This brought us to the end of the line in our exploration of the rails and roads of the UK, so we hope that next time you’re sat on a rail replacement service you have a little bit more insight into the challenges of replacing trains with buses!