OneBusAway / onebusaway-gtfs-modules

A Java-based library for reading, writing, and transforming public transit data in the GTFS format, including database support.

Home Page:https://github.com/OneBusAway/onebusaway-gtfs-modules/wiki

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

mmaranda-cs opened this issue · comments

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.

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

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.

@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?

@kurtraschke Oh, nice, thanks!

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.