Skip to content
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

GTFS: attributes pickup_type and dropoff_type are not considered #654

Closed
ynerant opened this issue Nov 12, 2024 · 2 comments
Closed

GTFS: attributes pickup_type and dropoff_type are not considered #654

ynerant opened this issue Nov 12, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ynerant
Copy link

ynerant commented Nov 12, 2024

Hi!

I just discovered the MOTIS project, and is exactly what I was looking for :) I noticed some issues and some missing features that I think they could be useful, so I am opening some tickets. I didn't see any contributing guidelines, so if I am doing wrong, please tell me.

I am running version v2.0.0-beta14 on a Linux server, but the issue I noticed is also present on the demo instance.

I am using multiple GTFS datasets, but the two main for this issue are:

I guess that you use the second one too in the demo instance.
In the german dataset, some trips include a stop time where pickup and dropoff are forbidden. This is for example the case of trains that are crossing country borders.

For example, consider the RB 25 line between Strasbourg and Offenburg. Take the trip n°862365 in GTFS files:

trip_id arrival_time departure_time stop_id stop_name stop_sequence pickup_type  drop_off_type
862365  19:22:00 19:22:00 221888 Strasbourg Bahnhof  0  
862365  19:26:00 19:26:00  386723 Krimmeri-Meinau   1  
862365 19:31:00  19:31:00   130487 Kehl(Gr)    2  1
862365   19:32:00  19:33:00  145152 Kehl Bahnhof  3   
862365  19:37:00  19:37:00   405096  Kork Bahnhof  4  
862365 19:40:00 19:41:00  579930 Legelshurst Bahnhof   5   
862365 19:45:00 19:45:00  28977 Appenweier Bahnhof  6   
862365 19:52:00  19:52:00   428649 Offenburg Bahnhof  7  

(I added column stop_name and removed stop_headsign for readability reasons)

As you can see, there is a stop Kehl(Gr), which is the border point between France and Germany. Since this is on a bridge, pickup and drop off are obviously not allowed on this point, which corresponds to the pickup_type=1 and drop_off_type=1 attributes.

We can find this trip on the demo website:
image

API Data are here: https://europe.motis-project.de/api/v1/trip?tripId=20241112_19%3A22_de-DELFI_2647505924

As you can see, Kehl(Gr) is displayed as it was a regular stop. The is the same for every train that is crossing the border between France and Germany, including ICEs (I didn't look on other borders).

I don't know if this kind of stops should be removed or not, but at least I think that pickup and drop_off attributes should be exposed in the trip API (we may for example want to display that a stop is a drop-off-only stop, which is frequent on night trains).
I found one usage of these parameters here: https://github.com/motis-project/nigiri/blob/master/src/loader/gtfs/stop_time.cc#L94
But I am not doing C++ and don't know how they are treated.

Since this is a cross-border train, it also exists in french data, but without the Kehl(Gr) stop. I activated the option to merge duplicates, and of course this train is not considered as a duplicated one because there is one more stop, and so times are diverging (I looked at #511 (comment) to see what are duplicated trains). I don't know what is a good way to solve this.

@felixguendling
Copy link
Member

Thank you for trying out MOTIS and for the kind words! :)

You hit a bug. Thank you for documenting it so thoroughly. The information is there and everything is implemented to skip those stops for the output. I just used the wrong access method. This also applies to canceled stops from GTFS-RT. Internally we just set in_allowed = out_allowed = false which is the sign for accessor functions to skip this stop. I just used the wrong accessor.

The official source for German schedule timetables is this:
https://www.opendata-oepnv.de/ht/de/willkommen

@felixguendling felixguendling self-assigned this Nov 12, 2024
@felixguendling felixguendling added the bug Something isn't working label Nov 12, 2024
@felixguendling
Copy link
Member

Should be fixed with #656 which is part of 2.0-beta-15. Can you please check and reopen if anything goes wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants