OneBusAway / onebusaway-gtfs-modules

A Java-based library for reading, writing, and transforming public transit data in the GTFS format, including database support.
Other
129 stars 106 forks source link

Pathway has required field, PathwayType, that is not present in GTFS Spec #122

Closed mmaranda-cs closed 5 years ago

mmaranda-cs commented 5 years ago

Summary:

gtfs-modules Pathway has required field, PathwayType, that is not present in GTFS Spec

https://groups.google.com/d/msg/onebusaway-developers/2Djfz7aXvM4/ElZefshJAwAJ

Steps to reproduce:

Create a valid pathways.txt and add it to your GTFS data set. It should not contain the PathwayType column because that is not part of the spec.

Expected behavior: gtfs-modules will be able to load the GTFS data set. Including pathways

Observed behavior: gtfs-modules throws an error because PathwayType is not present in the file.

As Sean pointed out this shouldn't be a part of gtfs-modules. The fix is relatively easy.

mmaranda-cs commented 5 years ago

The question is do we go with the draconian remove PathwayType or just make it optional and phase it out over time?

barbeau commented 5 years ago

OBA has always been pretty lenient in parsing GTFS, including supporting unofficial extensions, so IMHO we should just make it optional so that legacy pathways datasets still work.

I haven't recently compared the legacy and official pathways datasets - is pathway_type a 1:1 match with pathway_mode?

It would be great if a PR fixing this also added the other official pathways fields like is_bidirectional which aren't yet supported.

kurtraschke commented 5 years ago

@barbeau #114 contains an implementation of the adopted Pathways spec, although it looks like a few minor merge conflicts have arisen since the PR was opened.

That said, I took the approach in that PR of completely removing the legacy pathways fields - were any feeds using the original draft spec ever released in the wild?

barbeau commented 5 years ago

@kurtraschke Oh, nice, thanks!

barbeau commented 5 years ago

That said, I took the approach in that PR of completely removing the legacy pathways fields - were any feeds using the original draft spec ever released in the wild?

Yes, I believe the original draft pathways spec was used by a few producers and at least one consumer in production.