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

service_date table doesn't have feed_id field #54

Open
francot opened this issue Oct 14, 2016 · 3 comments
Open

service_date table doesn't have feed_id field #54

francot opened this issue Oct 14, 2016 · 3 comments

Comments

@francot
Copy link

francot commented Oct 14, 2016

service_date table doesn't have feed_id field so it's impossible manage multigtfs that use calendar_dates information

@jwhitlock
Copy link
Member

A ServiceDate is related to the Feed through the Service, such as service_data.service.feed_id or ServiceDate.objects.filter(service__feed_id=1).

@francot
Copy link
Author

francot commented Oct 14, 2016

Gtfs is also valid if come with empty calendar.txt file and all information about service_id validity in calendar_dates.txt File.

From GTFS reference:
Alternate: Omit calendar.txt, and include ALL dates of service in calendar_dates.txt. If your schedule varies most days of the month, or you want to programmatically output service dates without specifying a normal weekly schedule, this approach may be preferable.

In this case without feed_id in the table I cannot associate service_id to trips.

@jwhitlock
Copy link
Member

jwhitlock commented Oct 14, 2016

Yes, the "calendar_dates.txt only" strategy is the strategy used by the Portland TriMet feed, arguably one of the most important GTFS feeds. multigtfs handles this by adding a single Service record with a blank start_date and end_date, and relates the ServiceDate records to the Feed through this. On export, calendar.txt is omitted if there is only this "fake" Service record. See commit 2960772 for the changes and tests that aded this support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants