planarnetwork / dtd2mysql

MySQL / MariaDB import for DTD feeds (fares, timetable and routeing)
30 stars 10 forks source link

Joins at the beginning of the route should not be processed #80

Open miklcct opened 10 months ago

miklcct commented 10 months ago

In the current December 2023 timetable, there is a "join" entry of base W04046 (Mo - Fr 18:22 Ramsgate - Dover - Charing Cross) and association W03086 (Mo - Fr 15:29 Charing Cross - Canterbury - Ramsgate) at Ramsgate.

These are separate services in the timetable confirmed in National Rail Enquiries and various other websites. However, dtd2mysql joins them together to form a "circular" service on the long way round Kent.

In my opinion, if the "join" location is at the beginning of the route for the base UID, it should not be processed, similarly, if the "split" location is at the end of the route, it should not be processed.

linusnorton commented 10 months ago

I believe this is correct. The national routing guide prevents any circular journeys which is why National Rail would be filtering it out.

miklcct commented 10 months ago

I am referring to the Live Times functionality of website and apps, which shows circular services in full. This service isn't shown as a circular service on Live Times in the timetable, indicating that the join isn't in effect there.

In contrast, UID C72592 (Mo - Fr 20:56 Euston - Birmingham) has a split at Northampton to produce a portion UID C73677 (Mo - Fr 22:14 Northampton - Euston) back to Euston, which is shown in full in National Rail Enquiries.

The National Routeing Guide is irrelevant here.

linusnorton commented 10 months ago

In my opinion, if the "join" location is at the beginning of the route for the base UID, it should not be processed, similarly, if the "split" location is at the end of the route, it should not be processed.

I believe this would cause issues. When there is a join a new service is created containing the [assoc stops from origin to join station] + [base stops from join station to destination]. This is why the new UID is assoc UID _ base UID. The assoc train joins the base train.

It is quite common for a service to join at the origin of the base service. The schedule has probably changed but there used to be a base schedule that started at Ashford and went onto London Victoria (I think) and there was a train from Canterbury to Ashford that would join it.

miklcct commented 10 months ago

What is your opinion about the 15:29 Charing Cross - Ramsgate service which joins into a portion of the 18:22 Ramsgate - Dover - Charing Cross service in the data? The industry systems don't show these are the same service.

linusnorton commented 10 months ago

Not sure where you are seeing that. National Rail doesn't show it (https://www.nationalrail.co.uk/journey-planner/?type=single&origin=CHX&destination=DVP&leavingType=departing&leavingDate=110124&leavingHour=15&leavingMin=15&adults=1&extraTime=0#O), The Trainline doesn't show it (https://www.thetrainline.com/book/results?origin=urn%3Atrainline%3Ageneric%3Aloc%3ACHX5143gb&destination=urn%3Atrainline%3Ageneric%3Aloc%3ADVP5033gb&outwardDate=2024-01-11T15%3A15%3A00&outwardDateType=departAfter&journeySearchType=single&passengers%5B0%5D=1994-01-10&directSearch=false&splitSave=true) and railsmartr shows it as direct (https://tickets.railsmartr.co.uk/fares?origin=5143&destination=5033&outwardDate=2024-01-11&outwardDepartAt=15:15&adults=1&children=0&limit=5)

miklcct commented 10 months ago

Can you please try the "show direct trains only" option and search for Sturry to Dover? My point here is if the "rounder" should be considered a direct train.