4

I have a problem trying to join up train station data from different sources. There seems to be a standard to use 3 letter codes to represent each station. However, everyone seems to be using different codes.

For example, Stratford station in London has the following codes:

  • National rail: SRA
  • DLR: STR
  • TFL: SFD (or sometimes 1000226)

To add to the confusion, codes in one dataset can be used for different stations in other datasets (eg National Rail use STR to mean Stranraer).

Where would be the best place to find a mapping between all these different identifiers? Alternatively, if there is no such mapping, where would be a good place to begin building one, in a way that others can contribute to and use the data?

  • Did you look to see what the OpenStreetMap names or codes are? I think if you were making one, ensuring that it was compatible with OSM data would be very useful. – djq May 22 '13 at 2:54
  • While I'm not sure it will answer your exact problem (the multiple identifiers) there is an open data set on UK public transportation that seems to include categorization of railway stations. – Niels Keurentjes May 22 '13 at 11:41
  • The best source for unique identifiers of public transport is probably NAPTAN. AFAIK, these are what Open Streetmap and NPTDR use. However, the dataset itself doesn't contain mappings to the codes you list above, and I don't know if such a mapping exists. – bjwebb May 22 '13 at 16:43
2

There are a number of codes used to identify train stations. There is a good summary of the various codes here:

http://nrodwiki.rockshore.net/index.php/Identifying_Stations

That site includes links to reference that that you may be able to use in addition to NAPTAN, see:

http://nrodwiki.rockshore.net/index.php/Reference_Data

For example this site correlates CRS, NLC, TIPLOC and STANOX codes and has a MySQL dump available:

http://trains.barrycarlyon.co.uk/data/locations/

I think that covers what you're looking for.

  • Thanks Leigh, this information is really interesting. However, I don't think it's quite what I'm looking for. The dataset does include all the LUL and DLR stations, however, it treats stations with NR and underground services as two different stations. It also uses different 3 letter codes than the ones used by TFL. (For example Stratford DLR is ZSF, which doesn't match any of the ones I've seen before). – lucas May 25 '13 at 20:58
  • So, in order to use this data, I'd need 2 additional mappings: one for mapping the CRS codes used for LUL stations to the codes used by TFL and another to list which NR stations have interchanges with LUL stations. – lucas May 25 '13 at 21:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.