BlinkTagInc / gtfs-to-geojson

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

returns an empty file #27

Open dimacv opened 1 month ago

dimacv commented 1 month ago

Previously, on version 3.2.0, I extracted the data I needed with the config -

"agencies": [ { "agency_key": "feed_name_stops", "path": "feed_name.zip", "exclude": [ "stop_times", "trips", "shapes", "transfers", "pathways", "calendar", "calendar_dates" ] } ], "bufferSizeMeters": 400, "coordinatePrecision": 5, "outputType": "agency", "outputFormat": "stops", "zipOutput": false }

However, starting from version 3.3.0 and higher, this config returns an empty file.

Please explain why this is so?

brendannee commented 1 month ago

Thanks for reporting this issue. Can you share with me the GTFS file you are using with this config?

And also the output from running the command?

dimacv commented 1 month ago

Yes, sure. For example, to reproduce this behavior you can take the file from your examples - http://cccta.org/GTFS/google_transit.zip

From version 3.3.0 onwards the resulting .json file will be like this - {"type":"FeatureCollection","features":[]}

However, previously, up to and including version 3.2.0, the resulting .json file contained normal data.

brendannee commented 1 month ago

I figured out the issue - in the config you shared, in the exclude array it is excluding shapes, trips and stop_times - this excludes importing some of the data that GTFS-to-geojson needs to create the GeoJSON.

I published an updated version just how that handles excluding calendar.txt - grab that latest version and update the exclude array in the config and it should work as expected.