-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect schedules for ~1200 trips (associations) #64
Comments
GTFS does not support associations so they are combined into a new trip. See the details on the Associations section of https://ljn.io/posts/CIF-to-GTFS |
@linusnorton but when the 2 trips one from X to Y (13 stops) and another from Y to X (13 stops) are combined into a new trip with the only stop X, is it a correct conversion logic? |
It looks like a data issue to me. The base_uid and the assoc_uid appear to be the wrong way around. Normally a join consists of assoc service up to the point of join + base from the point of join. In this case the point of join is the first stop of the assoc and the last stop of the base so all you get is the one stop. |
Even though it may be a data issue in this very case, I have not yet managed to find any correctly converted associations in the latest data. Is it possible to add a parameter which disables the logic for associations when creating a GTFS from temp mysql tables? |
I'm just going to cross reference with what is in the DTD feed |
C83835_C83858 should have converted correctly - is that in your output? |
ok I see what you mean. |
I've added a check to avoid outputting trips with a single stop. I should be in version 6.4.3 |
@linusnorton I have a question about associated trips. |
It works differently for joins and splits. For a join, the associated service joins the base service. That means as well as keeping the original base service, we can add a new combined service of assoc start -> join point + join point + 1 -> end of base service. That's why the assoc tuid is first: assocTuid_baseTuid For a split, the associated service branches off from the base service. That means we create base service start -> split point + split point + 1 -> end of assoc service. In this case the constructed tuid is baseTuid_assocTuid |
Hi @linusnorton ,
I noticed that there is a trip in stop_times of a resulting GTFS which consists only of 1 station.
Digging deeper I found that the issue might be in the trips which have association by train uid.
The example train uids are: L07257 and L07493.
In the records in mysql table "stop_time" for the train_uid='43237' I can see that it is 100% correct and is equal to what I see in the source .mca file. However when the GTFS is generated based on this trip and it's association with another train_uid it results in a trip with a trip_headsign='L07257_L07493' and it consists only of one stop which is the "assoc_locaction=DONC".
Looks like the two trips which are outbound and inbound according to the used stops in the source .mca file are being merged in a strange way.
Since there are ~1200 trips in the resulting GTFS which have concatinated train uids in the trip_headsign field I made a conclusion that ~1200 trips are incorrectly converted. I also checked some other randomly and the issue is the same as described above.
I attached the original file
https://drive.google.com/file/d/1eiRbPhwpN56ba98rQhTHm5DwZ84jStth/view?usp=sharing
and the one we converted (or it is better that you convert with your latest version)
https://drive.google.com/file/d/1nMV5kmpkMXN3YQJNtrpJzHAjMYXauYrs/view?usp=sharing
The text was updated successfully, but these errors were encountered: