BlinkTagInc / gtfs-to-geojson

Generate geoJSON of transit route data from a GTFS file.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

exclude stops where there isn't any shape

2803media opened this issue · comments

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?

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"

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 ;)

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?

  • Pass a list of routes to exclude/include somehow?
  • Have a function that tries to detect a bad shape somehow?

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