BlinkTagInc / gtfs-to-html

Build human readable transit timetables as HTML or PDF from GTFS.
https://gtfstohtml.com
MIT License
184 stars 56 forks source link

excluding trips that are only no pickup/no drop off #110

Closed ehowington closed 3 years ago

ehowington commented 3 years ago

We have a client using their GTFS in conjunction with a CAD/AVL consumer that needs deadhead information in their GTFS. This is hidden from trip planners by making those runs no pickup and no drop off at both stops (the garage and the starting point of the next run.)

We can exclude the garage from the timetable by ensuring it's not included in timetable_stop_order.txt but the first stop is a valid stop, even if the deadhead is not a valid trip.

Do you have a recommendation (short of creating separate schedules without deadheads for G2H) on excluding those trips from populating?

See 10:30am "run" on Weekday SB for an example of this https://rvtd.org/routes/route-40/

brendannee commented 3 years ago

There are a few ways we could solve this:

Let me know which approach you think would be most suitable.

ehowington commented 3 years ago

Thank you for digging in Brendan!

I think the most logical one is: Have GTFS-to-HTML by default hide all trips where there is only one stoptime, since there is no way to ride a vehicle that only stops at one point.

There are cases where, because of direction_ids, timepoints, or some other perfect storm trips populate with only one stop time when in reality these are true trips and the G2H output is simply showing that something is amiss in how the files are constructed, but I think a missing trip would be as effective a flag for this kind of error as any (that, and I'm not sure it is necessary to have outputs that simply indicate errors as opposed to outputs that produce desirable results.)

I think this option works better than the first one because there are timetables where an agency will might include no pickup/no drop off in the middle of a timetable because the timepoint is not an actual stop, but is instead some other marker like a county line.

brendannee commented 3 years ago

I published version 1.4.14 which now excludes trips that only have one stop time (after considering the list of stops that will be rendered in the timetable, controlled by timetable_stop_order.txt

Try it out and let me know if this solves your issue - I tested it with RVTD route 40 and it did remove the runs with only one stop time.

ehowington commented 3 years ago

Outstanding - thank you @brendannee ! I will have our folks do some testing and let you know if we have any further issues with this.