Closed laem closed 6 months ago
Can you share the GTSF you are using with me so I can try? I'll update the library so that it can handle this type of GTFS.
This line of code makes me think it's not the case. https://github.com/BlinkTagInc/gtfs-to-geojson/blob/master/lib/formats/lines.js#L6
This GTFS https://transport.data.gouv.fr/datasets/horaires-des-tgv
France's high speed trains.
Direct link to the zip file https://eu.ftp.opendatasoft.com/sncf/gtfs/export_gtfs_voyages.zip
When I check the .txt files manually, it looks like it should be possible. Routes, trips, stopTimes, stops are present with coords.
But it looks to me like building geojson from a zip without shapes is not coded yet in node-gtfs ?
This lib might be the best option to do that https://github.com/ad-freiburg/pfaedle.
Maybe just mention it clearly in the docs :) ?
Done here in a naïve form https://github.com/laem/gtfs/blob/master/server.js#L57
Thanks for pointing this out.
I released a new version 3.5.0 https://github.com/BlinkTagInc/gtfs-to-geojson/releases/tag/3.5.0 which handles GTFS with no shapes.txt by falling back to getting all stops and drawing straight lines between them. It uses toposort to determine the correct order of stops for routes that have trips which vary and falls back to just using the trip with the most stop times if that doesn't work.
Check it out and let me know what you think.
Awesome, thanks, I'll try. It will provide better results than my algo I guess :) Should it also be included in node-GTFS's getShapesAsGeojson ?
It did work. This is the ouput of your lib.
This is my algo :
Note : one is not better than another. Depends on the UX we want. The first is cleaner, but the second tells us that a direct from Paris to Toulouse exists :)
I'm going to try to play with the opacity of routes depending on their frequencies.
Hi, I'm having a hard time to determine if this is the case.
My use case is a GTFS that has no shapes. So I'd like to create approximate geojson based on routes -> trips -> stopTimes -> stops coords.
When I run the tool, it gives me an empty geojson.
Thanks for your work.