@jamesevans: Following further investigation, hereâs an update on what I believe to be the outstanding issues with /Line/Timetable.
All data based on the update dated 25/5/2021.
All data - undocumented parameter
/Line/Timetable is documented as being /Line/{lineid}/Timetable/{fromStopPoint}, but it acually requires an additional ?direction={direction}
All data - 500 errors
A significant proportion of the requests return an error 500 âInternal Server Errorâ. This can be overcome by brute-force retry. For the date concerned, 647 out of 1907 requests returned an error on the first pass, nearly all 500s, with a scattering of 503 and timeout errors. Subsequent passes reduced the number of errors as follows:
647, 323, 151, 62, 34, 11, 6, 6, 4, 3, 1, 1, 1, 1, 1, 1, 0
In case itâs relevant, the request with an error in every pass was 286/490011319HB/outbound
Nonâexistent stop Ids - 400 errors
An orignating stop in the list returned by /Line/Route is rejected by /Line/Timetable with error code 400 and message âCould not find a matching ICS code for the Naptan Id xxxxxxxxxxx. Argument name: fromNaptanId.â
The only current example of this is cross-country/0000BRSTLTM1/inbound, but I note that there are 63 such stops, all of them rail, in the /Line/Route/Sequence data
Rail - No route sections
All the rail-related line/route/direction entries returned by /Line/Route are returned by /Line/Timetable with no route sections and the error message âThe stop you selected has now been removed from the route, and therefore we cannot show you a timetable. The route page will be updated shortly to reflect these changes.â
It should be noted that the stations and stops sections of the returned data appear to be correctly populated
Bus - no route sections
The same problem arises with a handful of bus entries, in this case only two entries:
412/490013142C8/inbound and 434/40004410113A/inbound. If you can spot what is different about these two, it may give you a handle on the rail issue
Bus - no interval sets
I have only seen this with hereeast-shuttle/490001338Z/outbound. I note that this is a short, circular, outbound-only route and I suspect that this is related to the more genreal problem with looping or divergent routes.
Bus - departure stop does not match originator
This is where the stop returned by /Line/Route and used as a parameter to /Line/Timetable is not the same as the departureStop in the timetable section of the returned data. In the cases that Iâve examined, the correct sequence appears to be originator/departureStop/remaining stops in the interval set. The first three instances of this are:
18/490000077E/inbound - departure stop 490000077H
24/490015832E/outbound - departure stop 490011003E
40/490006232W1/outbound - departure stop 490015428N
This may turn out to be a special case of the more general missing stop problem below.
Bus - missing 2nd stop
There are over 300 instances where the second stop in sequence is missing. This is the first stop in the interval set, after originator/departureStop. This affects lines 2/inbound, 3/both/, 4/outbound, 6/outbound, 7/both and many more. Again this may be a special case of the more general missing stop problem.
Bus - general missing stop problem
There are just under 200 other instances of both stops other than the 2nd and multiple stopns missing from the timetable. Examples are 27/outbound, 81/both, 96/outbound, 101/outbound, 107/both.
This, and the previous two categories, could all be related to the issue of stops in the same StopArea that you have mentioned previously.
Bus - duplicate stop
There are a number of instances where the same stop occurs twice in succession in an interval set. These are:
490000054CA in 125/outbound/0
40004402075A in 203/inbound/0
490011630S2 in 366/outbound/0
490011630S2 in 366/outbound/1
490002115Z in 483/inbound/0
930GTMP in city-cruises/outbound/0 - I know this isnât a bus
Bus - multiple routes with missing stops
This may be a variant of the issues above. At least two routes are present with stops missing, typically in one of them. Unlike the TxC files, there are no start and end dates so I can only assume that all routes apply to the current period.
Examples are:
18/inbound, 40/outbound, 125/inbound, 150/outbound
Bus - miscellaneous
20/inbound: tt is wrong at Loughton, also missing 2nd stop
Route: âŚ/1500IM504/150042015006/1500SAINS1/1500LOUGHTON /150042010002/âŚ
Timetbl: âŚ/1500IM504/150042015006/1500SAINS1/ 1500IM504/150042010002/âŚ
20/outbound: tt is also wrong at Loughton
Route: âŚ/1500IM504/150042015007/1500SAINS1/150042010004/ 150042010005/âŚ
Timetbl:âŚ/1500IM504/150042015007/1500SAINS1/ 1500IM504/150042010005/âŚ
108/outbound: tt missing 2nd entry, tt & route both showing route via Tower Bridge, rather than via Blackwall Tunnel, tt also has erroneous non-stop route between Chrisp Street Market & North Greenwich Station
192/outbound: route has 490001024Z, tt has 490001024X at Bush Hill Park Station
224/outbound: tt missing 2nd stop, route has incorrect segment linkages, caused by the loop at Belmarsh Prison, should be straightforward 1>2>3
358/inbound: route has a variant path missing, tt is correct
371/outbound: tt has variants with erroneously missing stops
384/inbound: multiple differences between route & timetable
397/both: same mix-up at Loughton as line 20
401/both: route is missing a variant, tt is correct
463/outbound: route & tt differ
605/outbound: tt truncated
663/both: route & tt differ
655/both: tt is showing only a limited-stop service, route has full sequence
681/inbound: tt has limited-stop service
718/outbound: route & tt differ
B12/outbound: tt has limited-stop service
EL2/inbound: tt has limited-stop service
R5/inbound: tt has 2 variants, one missing 2nd stop, the other missing stops 2-41
R6/inbound: route has loop problem, similar to 224, tt correct
R10/inbound: tt has two variants, one missing a couple of stops, the other missing a lot
I think that R5 and R10 are mixed up with each other, as they are essentially the same route in opposite directions
DLR
Timetable is missing Poplar>Stratford via Pudding Mill Lane
River
RB1/inbound: route missing limited-stop services
RB1/outbound: route missing CAW-GNW non-stop, both missing EMB-WMR-WMP-BFR
RB2/inbound: route missing MBK-BSP non-stop
RB6/inbound: both missing GNW, route has WMR - not in timetable, both missing BSP-CHP non-stop
RB6/outbound: both missing MIL-WRF-WAS
Tube
Central/outbound: tt missing GGH-HLT
Circle/inbound: mix-up between PAC and PAH at Paddington - tt has a section PAC-RYO which is not possible
District/inbound: tt missing ECT-KOY
Metropolitan/both: route missing fasts and semi-fasts
Metropolitan/outbound: route has Willesden Green stop, missing from tt
Piccadilly/both: route missing non-stop TNG