Differences between API, Txc, TNDS & BODS

There is a difference in the use of StationId/AtcoCode between the Unified API and the BODS GTFS feed on the one hand and Tfl’s TxC file and TNDS on the other.

This relates to all non-bus (i.e. tube, dlr, tram, cable-car, river-bus) data where, for example, the former use 940GZZLUHAW for Harrow & Wealdstone Underground Station, while the latter use 9400ZZLUHAW.

I’m aware that the G codes are the parents of the other ones, but should two of the feeds be modified to match the other two?

I believe there used to be a similar problem with the Unfied API bus feed occasionally changing to 490G… codes, instead of 4900… ones.

Hi there!

In an ATCO code, after the three-digit local authority code, the next character is either a 0 or a G. A 0 indicates a StopPoint, whereas a G indicates a StopArea.

A StopArea is a grouping of StopPoints and allows the access area of a station to be grouped together with its platforms.

Each system or data source should use whichever stop type is most appropriate for its use case. Indeed, the Unified API uses both StopPoints and StopAreas.

In the world of buses, for example, you might have a bus station that is represented by a 490G code. Stratford Bus Station, for instance, is 490G000773. However, if you want to get live arrivals, you’ll need to specify a specific bus stop at that bus station. So for Stop A at Stratford Bus Station, you’d use 490012904A.

I hope this helps. Please let us know if you have any further questions.

Hi @LeonByford

I know that, but, when providing lists of stops within a route, I would have thought that the 0 code would be more appropriate.
Hint - I rather suspect that, if you changed your TxC-format file to match the API, the TNDS data would magically sort itself out

There are 0 codes to represent platforms, concourses and entrances. I think it wouldn’t really make much sense to use the codes for entrances or concourses. I can see an argument that we should use the platform codes, but you often have multiple possible platforms.

For example, there are three Jubilee line platforms at Stratford. 9400ZZLUSTD4 is Platform 13, 9400ZZLUSTD5 is Platform 14 and 9400ZZLUSTD6 is Platform 15. Any of those platforms can be used, so it wouldn’t be appropriate to choose one specific platform.

9400ZZLUSTD is the concourse, which I think can’t really be described as being on the Jubilee line.

Therefore, if you want a list of stations that are on the Jubilee line, I think it would be best to use 940GZZLUSTD, which represents Stratford Underground Station overall.

That’s my reasoning, anyway!

Sorry Leon, got my 0s and Gs the wrong way round. I agree that G a more appropriate code. Should it not then be used in your TxC-format file?

TransXChange is a timetable format, and therefore provides data on individual train services. As such, it’s appropriate to indicate the specific platforms that will be called at by a given train.

That said, I accept it’s probably confusing to have all these different codes. And most open data users don’t really think about platforms, concourses and entrances – they just want to get data about a station.

(cc @SarahLS)

My mistake again, I had forgotten an earlier kludge I had inserted to strike the platform numbers from the TxC-format data.

That said, I don’t think they add much useful, particularly since, for stations with more complex platforming arrangements like Wimbledon and other termini, you just use platform 1 all the time.

I also note that /Line/Timetable in the API uses the G codes…