Closed k-yle closed 7 years ago
There is a workaround here: https://github.com/brendannee/gtfs-to-html/issues/27
I just pushed an update that makes showOnlyTimepoint default to true. This should speed up timetable generation (as it will only consider stops that are timepoints) and I think is what most people would want as default.
Try setting "showOnlyTimepoint" to true
in your config.json and see if this works as expected.
I tried both methods, however I still get the "JavaScript heap out of memory" error.
The task manager shows that node.js uses around 3200 MB before it stops (with a limit of --max_old_space_size=3000
, the highest I can allocate).
I pushed an update which should solve this memory error - now each timetable is built in series and so it gets to a point where it is unable to find trips for a specific route.
This GTFS file is interesting in that is has 10,000s of service_ids for 1000s of routes - which is pretty intense. It looks like each route has its own service id - which makes the lookup take a while.
Give it a try and let me know where you get.
Note that you can now create a timetables.txt and timetable_pages.txt file as detailed in the readme to specify which routes and directions get created - so if you don't need all the thousands of routes in this file then you can build just the ones you need by including these files.
I got the same message when running. So the memory error is gone, its now complaining that for a specific route, direction and set of service_ids, it can't find any trips.
You can try creating a timetables.txt file and adding it to the folder with your GTFS - this allows you to specify a route_id, direction_id and specific days of the week for each timetable you want to generate. See this file for an example: https://github.com/BlinkTagInc/gtfs-to-html/blob/master/examples/timetables.txt
Yes, Auckland Transport tends to remove trips but keep all the other info - e.g. in the school holidays, the school bus services are removed from the trips.txt
file but kept everywhere else.
Is there an easier way to generate timetables based on the route_short_name
property?
For example, if I wanted a timetable for the 881
bus service (881
is the route_short_name
)?
Currently, if you just wanted a timetable for one route, you could create a timetables.txt file with just one line and it would only generate one timetable. You have to use route_id instead of route_short_name - so you'll have to check in routes.txt first to figure that out.
Give it a try and let me know if you have questions.
I tried your tool on the Auckland Transport GTFS data (for Auckland, New Zealand), but I got this failure:
This is what the task manager shows:
Complete logs:
config.json
file:you can download the GTFS data from here.