• 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!

Does a list of stations and the TOCs serving them exist?

Status
Not open for further replies.

Cross City

Member
Joined
27 Jan 2020
Messages
935
Location
Birmingham
Hi everyone,

As per the title really. I'm looking for an extensive/detailed list of all GB mainline rail stations and was wondering if anybody knew where to find it?

Information needed would be:
  • Station name and 3 letter code
  • TOC's serving station
  • Coordinates of station if possible.
Happy with any format, be that a written list, spreadsheet, link to a webpage etc.

Many thanks.
XCL
 
Sponsor Post - registered members do not see these adverts; click here to register, or click here to log in
R

RailUK Forums

NSE

Established Member
Joined
3 Mar 2010
Messages
1,919
Whilst it isn’t always accurate for the finer details, Wiki will tell you which TOC’s serve a station.

I have a rail atlas which has all the stations listed but it also has tunnels, junctions and other staff listed in the same index so you’d need to look closely for which names are stations etc.
 

starlight73

Member
Joined
1 May 2024
Messages
167
Location
London
RailwayCodes.org has some of the things you’re after:

it has the names, 3 letter codes and coordinates. However it doesn’t have the list of operators who serve the station.

 

LNW-GW Joint

Veteran Member
Joined
22 Feb 2011
Messages
21,918
Location
Mold, Clwyd
Last edited:

sjoh

Member
Joined
7 Apr 2016
Messages
372
Location
London, E11.
Should be possible to write a script to compile that sort of data into a csv/xml file from various sources if you can't find one that already exists. I'd have a tinker myself at doing it but unfortunately don't have the time!
 

enginedin

Member
Joined
15 Dec 2020
Messages
473
Location
UK
I assume when @NSE says wiki they mean Wikipedia (pedantically, wiki is much more general, and the term can apply to lots of websites). If so, then I agree that most (if not all) of this data would available via wikipedia.

There is a way to query wikipedia programmatically via https://dbpedia.org/sparql - although the standard caveat applies that wikipedia data is not controlled and not always accurate. I'm happy to teach people sparql - it's a pretty interesting query language :) e.g. @Cross City you might want to start with this page https://dbpedia.org/page/Category:Railway_stations_in_Great_Britain_by_train_operating_company
 
Last edited:

Cross City

Member
Joined
27 Jan 2020
Messages
935
Location
Birmingham
This may have some of what you are looking for

This is damn near perfect thank you!

== Doublepost prevention - post automatically merged: ==

project mapping has a map of all stations with operators drawn on.


Be aware that many pdf readers choke on this file, in my experiance acrobat reader is by far the best for large single-page pdfs like this.

Yeah I love the ProjectMapping stuff, I just need it in text list format.
 

etr221

Established Member
Joined
10 Mar 2018
Messages
1,596
The 'Knowledgebase Stations data feed' has I think what you need/want, and is obtainable from the Rail Data Marketplace.
To obtain it (at least how I did it): (1) set yourself up on the Rail Data Marketplace (if you aren't already); (2) subscribe to the Knowledgebase Stations data feed (from Rail Delivery Group); (3) go there and follow link to and download the documentation (KB feeds data specification pdf); (4) go to section 6 Stations - there is a link to download an 'all stations' zip file, do so; (5) in the zip file is a 'stations.xml' file of the data, extract this and convert to a ~.csv file; (6) open this in your favourite spread sheet program and delete all the columns you don't want (there are lot, and many are wide...)
And you have it...

My latest version attached - or would have been if the forum system permitted.
 
Last edited:
Status
Not open for further replies.

Top