google / google/transit

Use of block_id together with required arrival_time and departure_time makes contradictory information too easy

Open
#569 18 comments 0 reactions 0 assignees View on GitHub
Discussion Period GTFS Schedule Support: Needs Feedback
Dominant language
No language data
Stars
1.1k
Forks
225
Avg merge
7d 17h
Merged PRs (30d)
3

Description

### Introduce yourself

I have previously contributed some code changes to the GTFS validator; I'm not associated with any particular feed.

### Ask a question

I recently noticed contradictory data creating a poor display with the feed for Park City Transit as displayed by Transit App. I believe other feeds that use block_id may do the same thing.
https://mobilitydatabase.org/feeds/gtfs/tld-1325

Transit App displays two arrivals with different headsigns and sometimes different times (within a few minutes) when in reality there is a single vehicle. I attached a screenshot showing the situation. This is a bad user experience, of course, since it's not clear which headsign is correct or which time is correct.

![Image](https://github.com/user-attachments/assets/4a183c02-f180-4dc9-8ff6-475e218aad73)

I first describe the technical issue and then mention two possible ways to improve the situation.

Technical issue:
The feed uses block_id for vehicles, both at end stations and at a significant transit station where they have trips starting and ending but to some passengers is just an intermediate stop.

The arrival_time and departure_time for the last stop of trip A do not match the arrival_time and departure_time for the first stop of trip B.

Example: Vehicle arrives at 9:00 and departs at 9:02.
Feed shows:
trip A and trip B in the same block
trip A final stop: stop alpha, arrive 9:00, depart 9:00
trip B first stop: stop alpha, arrive 9:02, depart 9:02

Since arrival_time and departure_time are both required, even at starting and ending stops, the feed uses the recommended approach of using the same time for both. But this creates contradictory data.

Transit App shows a departure at 9:00 using the headsign for trip A and a departure at 9:02 using the headsign for trip B.

Ideas to improve the situation; either one or both would help, I think:

* Require that arrival_time and departure_time both match (or are omitted, if the second suggestion is adopted) for trips connected by a block_id. We can add a check in the validator tool to help feeds avoid the inconsistent data.

* Do not require a departure_time on the final stop of a trip or an arrival time for the first stop of a trip. Encourage feeds to omit these times unless they are meaningful. Why are they required when they are generally meaningless?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.