patrickbr / gtfstidy

A tool for checking, sanitizing and minimizing GTFS feeds.
GNU General Public License v2.0
114 stars 15 forks source link

drops columns when cleaning pathways.txt #12

Open derhuerst opened 2 years ago

derhuerst commented 2 years ago

I'm using gtfs-hub to transform the DELFI GTFS feed, and gtfstidy drops columns:

cd gtfs-hub
mkdir -p data/gtfs
make data/gtfs/DELFI.tidied.gtfs
# tidying DELFI.raw GTFS feed using Patrick Brosi's gtfstidy
# docker run -i --rm -v $PWD/data/gtfs:/data/gtfs derhuerst/gtfstidy --fix -o /data/gtfs/DELFI.tidied.gtfs /data/gtfs/DELFI.raw.gtfs
# Parsing GTFS feed in '/data/gtfs/DELFI.raw.gtfs' ... done. (0 trips [0.00%], 139 stops [0.03%], 872 shapes [0.01%], 0 services [0.00%], 0 routes [0.00%], 0 agencies [0.00%], 255 transfers [0.03%], 0 pathways [0.00%], 0 levels [0.00%], 0 fare attributes [0.00%] dropped due to errors. Use -W to display them.)
# Outputting GTFS feed to '/data/gtfs/DELFI.tidied.gtfs'...

head -n 1 data/gtfs/DELFI.raw.gtfs/pathways.txt
# "pathway_id","from_stop_id","to_stop_id","pathway_mode","is_bidirectional","traversal_time","length","stair_count","max_slope","min_width"
head -n 1 data/gtfs/DELFI.tidied.gtfs/pathways.txt
# pathway_id,from_stop_id,to_stop_id,pathway_mode,is_bidirectional,length,traversal_time
patrickbr commented 2 years ago

Do the pathway.txt columns have any non-default values? gtfstidy drops any column that is completely empty or only filled with the GTFS default values :)

derhuerst commented 2 years ago

AFAIR they don't contain any values, so semantically it's fine, but validators stumble over this.

patrickbr commented 2 years ago

Hm, but only pathway_id, from_stop_id, to_stop_id, pathway_mode and is_bidirectional are required values for pathways.txt, the others are optional, so IMHO this should be fixed in the validator.