• Our new ticketing site is now live! Using either this or the original site (both powered by TrainSplit) helps support the running of the forum with every ticket purchase! Find out more and ask any questions/give us feedback in this thread!

Data showing stations connected to each other?

Status
Not open for further replies.

NarrowG

New Member
Joined
23 Jan 2016
Messages
4
I've been investigating the ATOC fares and timetable data, as I want to attempt to map fares and then build a split-ticketing tool of my own.

To do pathfinding I need to know which are valid routes between stations e.g. station X is connected to stations Y and Z; or station P is only connected to station Q. I've found geographic location data in the timetable data files, but I cannot infer valid routes from this. Does the data exist?

Also, 3.3.6 of the routeing guide says:
Due to the inaccuracy and incompleteness of the NRT mileage data described above, all booking engines use a different data source (ie, they do not use the NRT mileages).

Is this as-the-crow-flies geographic distance data (as Google Maps et al will give me) or by-rail distance? Is there a source for the latter (to work out cost-per-mile for different tickets)?
 
Sponsor Post - registered members do not see these adverts; click here to register, or click here to log in
R

RailUK Forums

najaB

Veteran Member
Joined
28 Aug 2011
Messages
33,734
Location
Scotland
To do pathfinding I need to know which are valid routes between stations e.g. station X is connected to stations Y and Z; or station P is only connected to station Q.
With a few notable exceptions, all stations are connected to all others. The question of if there are services between the two is left as an exercise for the reader.
 

NarrowG

New Member
Joined
23 Jan 2016
Messages
4
With a few notable exceptions, all stations are connected to all others. The question of if there are services between the two is left as an exercise for the reader.

Hardly - if no junctions a station is only connected to two other stations at most. By traversing the graph created by the stations (nodes) you can determine routes between any stations on the graph. Very useful if going back one stop and changing trains is quicker/cheaper than continuing on the shortest route to your destination.
 

najaB

Veteran Member
Joined
28 Aug 2011
Messages
33,734
Location
Scotland
Hardly - if no junctions a station is only connected to two other stations at most. By traversing the graph created by the stations (nodes) you can determine routes between any stations on the graph. Very useful if going back one stop and changing trains is quicker/cheaper than continuing on the shortest route to your destination.
Hence (almost) every station is reachable from (almost) every other station by using enough nodes.
 

NarrowG

New Member
Joined
23 Jan 2016
Messages
4
Hence (almost) every station is reachable from (almost) every other station by using enough nodes.
We appear to be going round in circles :D

I have not found a data source containing the edges, only nodes. Do you know where I can find such a data source?
 

Muzer

Established Member
Joined
3 Feb 2012
Messages
2,784
To answer the original question, the booking engines infer which stations are connected to which others from the timetable data, though I'm not sure if such data includes mileages, and if not from which source they come. But this is why you often get (minor and not usually very exploitable) anomalies whereby booking engines will accept fares from A to B via C where A is a small station and going via C involves doubling back between A and C. Because timetable data often won't include timing information for fast trains passing very small stations, so the booking engines don't know that the small station is on the same route.
 

miami

Established Member
Joined
3 Oct 2015
Messages
3,305
We appear to be going round in circles :D

I missed that part of Dijkstra's algorithm. Not that I've not implemented it accidently.

I have not found a data source containing the edges, only nodes. Do you know where I can find such a data source?

Baack in 2001 I did find a source somewhere on uk.railway, it was a text file that listed all the lines, and the distances from one station/junction to the next.

Haven't managed to find it since.
 

Paul Kelly

Verified Rep - BR Fares
Joined
16 Apr 2010
Messages
4,235
Location
Reading
If you write to ATOC it is possible to get a sample copy of the electronic routeing guide data, which contains the station-to-station distances in decimal miles (converted from miles and chains).
 

PermitToTravel

Established Member
Joined
21 Dec 2011
Messages
3,042
Location
Groningen
I missed that part of Dijkstra's algorithm. Not that I've not implemented it accidently.



Baack in 2001 I did find a source somewhere on uk.railway, it was a text file that listed all the lines, and the distances from one station/junction to the next.

Haven't managed to find it since.

Was this the data you found?
 
Status
Not open for further replies.

Top