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

Multiple agencies in single GTFS file #179

Open
yashgt opened this issue Jan 1, 2025 · 6 comments
Open

Multiple agencies in single GTFS file #179

yashgt opened this issue Jan 1, 2025 · 6 comments

Comments

@yashgt
Copy link

yashgt commented Jan 1, 2025

My GTFS file has the data of two agencies, 4.4MB in size. When I provide the URL of the file on the web version of the tool, the generated output carries the HTML of only the first agency. How to generate the output for both agencies? The agencies are related to each other and that is the reason they are in a single GTFS file and need to be shown in a single HTML.

The GTFS file is at URL http://15.206.194.4/gtfs/gtfs.zip.
The generated output is at http://15.206.194.4/html.

@brendannee
Copy link
Member

Can you share the link to the GTFS file? I'm unable to access 15.206.194.4 to view the GTFS.

@yashgt
Copy link
Author

yashgt commented Jan 2, 2025

The file can be downloaded now from http://15.206.194.4/gtfs/gtfs.zip

@brendannee
Copy link
Member

Thanks,

I think the issue is that some routes with different agencies have the same route_short_name which is what GTFS-to-HTML uses as in URL/filename when generating timetables when there is not a timetables.txt file present. For example, MRG113 is a route_short_name for both ktcl-goa-in and dt-goa-in.

The way to handle this is to add a timetables.txt file which specifies each route_id that you'd like to generate a timetable for, a filename for that timetable (and optionally how you'd like to group these on a single page). See https://gtfstohtml.com/docs/timetables for details.

OR you could update the route_short_name to be unique.

@yashgt
Copy link
Author

yashgt commented Jan 2, 2025

http://15.206.194.4/gtfs/config.json is the config file. Is the agencies section correct?

I will be making route short name unique.

@yashgt
Copy link
Author

yashgt commented Jan 2, 2025

The HTML includes routes of both agencies. However, name of only the first agency appears on the page that lists the routes. The HTML title shows both agency names together.
In the documentation for agencies, you might want to mention that the agency Key should match the agency_id in the agencies.txt file of the gtfs.

http://15.206.194.4/html as an example.

@brendannee
Copy link
Member

Good catch. I published an updated version of GTFS-to-HTML 2.10.7 which should resolve this.

Try it out and let me know how it works for you.

The https://run.gtfstohtml.com service is also updated.

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