Skip to content

Fix intermediate stops along trip headsign#41

Open
PatrickSteil wants to merge 5 commits intopatrickbr:masterfrom
PatrickSteil:fixintermediatestops
Open

Fix intermediate stops along trip headsign#41
PatrickSteil wants to merge 5 commits intopatrickbr:masterfrom
PatrickSteil:fixintermediatestops

Conversation

@PatrickSteil
Copy link
Copy Markdown
Contributor

In the Swiss GTFS Instance, there is a data-bug where the trip_headsign is set to the stop_name of a stop along the trip, but not the last stop. An example is this S4 (screenshot from travic.app):

Screenshot 2026-01-10 at 12 23 09

The train stops at "St. Gallen", but then continues and the trip headsign is somewhat confusing (because the train left "St. Gallen", and is heading to another stop (in this case: "Rapperswil SG").

This PR fixes this, by checking whether the trip headsign matches the name of an intermediate stop along its journey, and if yes, set the orignal trip headsign as stop_headsign, and replaces the trip headsign by the name of the last stop.

@patrickbr
Copy link
Copy Markdown
Owner

This seems like a useful option. I had a minor comment in my review.

@PatrickSteil
Copy link
Copy Markdown
Contributor Author

@patrickbr Thanks! I think you did not submit your review :) I don't see any comments?

Comment thread processors/intermediateheadsign.go Outdated
@patrickbr
Copy link
Copy Markdown
Owner

@patrickbr Thanks! I think you did not submit your review :) I don't see any comments?

Sorry, forgot to submit the review...

@PatrickSteil
Copy link
Copy Markdown
Contributor Author

@patrickbr could you have another look at this please? are the changes what you had in mind?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants