The basics of processing GTFS with the OneBusAway GTFS Transformer CLI
-
Move into this directory
cd learnyougtfs/transformer
-
Run transformer (full documentation is here. And making sure modifying the match.json to match at least one record like the example below else it will result in error of Java zipping empty file)
java -jar -Xmx4G -server onebusaway-gtfs-transformer-cli-1.3.3.jar --transform=match.json ../data/google_transit.zip ../data/gtfs_out.zip
To change the transformations you perform on your gtfs feed, open match.json
and change the arguments to suit your needs.
Here are some examples (use one at a time):
{"op":"retain", "match":{"file":"routes.txt", "route_short_name":"Red"}}
{"op":"retain", "match":{"file":"trips.txt", "trip_id":"2139539"}}
{"op":"retain", "match":{"file":"trips.txt", "trip_id":"2139539"}, "retainBlocks":false}