BlinkTagInc / gtfs-to-geojson

Generate geoJSON of transit route data from a GTFS file.
MIT License
114 stars 23 forks source link

exclude stops where there isn't any shape #23

Open 2803media opened 10 months ago

2803media commented 10 months ago

Hi this works very good but sometime the raw data is bad like in this example:

Screenshot 2023-11-13 at 15 52 21

As you see some route doesn't have any shape, and the algo draw a strait line between stops. Do you know of we can exclude those "routes" from the geojson output?

brendannee commented 10 months ago

You could use the config option outputType set to route and then get one geojson file per-route. This would allow you to pick and choose which you want to include.

Would that work around the issue for you? Or do you think there is a need for a configuration option to "ignore trips with no shapes.txt"

2803media commented 10 months ago

Thanks for the reply @brendannee As I use a country dataset with several gfts and several providers, maybe the option to ignore trips with no shapes.txt can be a good improvement.

But in this case, the GTFS has shapes.txt https://www.data.gouv.fr/fr/datasets/r/92af6161-1b1a-4e0b-8f60-d97f213d993a but when you use it you get straight lines because the provider give a "wrong" shapes.txt :

https://gist.github.com/2803media/d010a2b17603a9daddd48746a44dd37f

Thanks for your feedback on this ;)

brendannee commented 9 months ago

Thanks for sharing this dataset.

For your case where you want to explicitly exclude some routes with bad shapes, what would be the best way?

Can you share with me an example route from that GTFS you shared which has a bad shape?