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

Fix invalid gtfs file caused by agencies not in hardcoded list #95

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

dzfranklin
Copy link
Contributor

Inputting a timetable from the national rail data portal I get an error when importing into OpenTransitPlanner: could not find Agency with specified id=QV for route <Route null null>

I believe OpenTransitPlanner is correct here because the GTFS validator agress the file is invalid.

The routes.txt contains routes with agency id QH, QR, QU, and QV. Per openraildata these are network rail business codes for Anglia, North West & Central, Wales & Western, and East Midlands. One example is the "QR boat service from STQ to STQ". This appears to be the ferry from Southampton to the Isle of Wight operated by South Western. I have no idea why it isn't under their code.

At least in this specific table all the routes are by bus or boat.

The simplest solution I can think of would be to omit the operator code for operators not in the hardcoded agencies list. That way they will be exported with the existing 'ZZ' - Other operator code.

The timetable can contain routes not in the hardcoded list in
agencies.ts. In particular I've seen QH, QR, QU, and QV in the national
rail data portal timetable.

This commit exports such routes using the existing 'ZZ' - Other operator
agency.
@linusnorton linusnorton merged commit 7840ec8 into planarnetwork:master Aug 5, 2024
4 checks passed
miklcct added a commit to Jnction/dtd2mysql that referenced this pull request Sep 17, 2024
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

Successfully merging this pull request may close these issues.

2 participants