How To Brows Stop Points?

Hello there!
I’m trying to build a simple tool that allows users to get the arrival time for a specific line at a specific stop. What is a little challenging is allowing the user to brows through stop points so they can select the one they are interested in:

The transport hub Hammersmith (id: HUBHMS) has a child, for example, of type NaptanOnstreetBusCoachStopCluster with id: 490G000567.
This cluster has 3 more children of type NaptanPublicBusCoachTram (with ids: 490007708V, 490007708X, 490007708XA) which I wanted to allow the user to subscribe to.
Since all three stop points have the same common name (fair enough), I thought the user might be able to select the one stop point he is interested in by displaying the departing lines from that stop point; in other words, out of the context.

My wrong expectation was that one particular line only leaves from one particular stop point in the same family (the same NaptanOnstreetBusCoachStopCluste in this case).
However, both stop points 490007708V and 490007708X list line 220 as a departing line. There are other overlaps like this as well.
So showing the user two stop points, both with the same common name and the same lines departing from it won’t make much sense to anyone looking at it.
Observing closer, only 490007708V returns arrival times queried in combination with 220. The other stop point 490007708X only returns an empty array. Furthermore, 490007708X also shows some inconsistencies in its anatomy: It’s field indicator only has a value of “Stop” and the field stopLetter is not present at all.

My question is if there is anything I should know about the API that helps me solve this problem – allows the user browse a list of stop points that he can subscribe to. Should stop points of type NaptanPublicBusCoachTram hidden from the user if they are not fully set up with all the usual fields (e.g. indicator, stopLetter etc.)? If so what would these field be?

Please let me know if I haven’t been clear/made sense in some part.
Many many thanks for any help in advance, Stephan.

Correction: A mistake I made above is wrongly thinking that line 220 departs from 490007708X. It does not and, hence, I’m not an empty array for the arrival times. The original question is still apt: the same line can depart from multiple stop points with the same parent.

Solution: Given that some stops do not clearly identify themselves (lacking indicator or stopLetter) the solution I’ve picked to allow the user brows through stations and giving him a sense of what station he is looking at is to display some short form of an arrival board for that station.

The W9 serves both stops on each side of Green Dragon Lane (in both directions as it happens). It serves 490008170W before the Highlands Village loop and 490008170E afterwards. I think they must be part of the same hub.

An example without an intervening loop would be the 192 which serves stops on both sides of the road at Lea Valley Tesco (aka Meridian Water Station) - both 490007254E and 490007254W.

So never mind the 220, there are other real world examples.

1 Like

@Stephan I think you are making some incorrect assumptions about the relationship between bus stoppoint children. Also, as you are obtaining arrival data by NaPTAN code it can be used to find all the data needed to clearly identify most TfL bus stops for your users.

Using one of your examples:

490007708V
Stop:		Hammersmith Library (Stop Q >>N) in Hammersmith
Location:	244 Shepherds Bush Road, W6 7AB
Towards:	Ladbroke Grove Or White City
Routes:		72, 295, 220, N72, 283
490007708X
Stop:		Hammersmith Library (Stop R >>S) in Hammersmith
Location:	227 Shepherds Bush Road, W6 7AN
Towards:	Barnes
Routes:		N72, 283, 72
1 Like