New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for stop_headsign in TransitIndex #1301

Closed
demory opened this Issue Nov 21, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@demory
Member

demory commented Nov 21, 2013

Current, certain TransitIndex methods that return trip-based results (e.g. stopTimesForStop) only provide the headsign if trip_headsign is defined in trips.txt, ignoring stop_headsign as defined in stop_times.txt (which OTP does process -- see #438). The TransitIndex methods should also check for stop_headsign if trip_headsign is not defined.

@abyrd

This comment has been minimized.

Member

abyrd commented Oct 6, 2016

It appears that this was partially addressed in 5ef4a3e on the 0.10.x branch, but changes didn't make it into master.

@abyrd

This comment has been minimized.

Member

abyrd commented Oct 13, 2016

I now see that the transit index API returns TripTimeShort objects to represent the stoptimes within a trip. Each TripTimeShort (one for each stop on the trip) has a headsign field. This headsign field is set using the getHeadsign method on the trip times, which checks for a per-stop headsign and falls back to the headsign for the entire trip if there is no array of per-stop headsigns. So it looks like this issue is solved.

What threw me off is that all the old index API model classes are still in the OTP repo, including StopTime but they are not used anywhere. I'll clean them out.

abyrd added a commit that referenced this issue Oct 13, 2016

@abyrd abyrd closed this Oct 20, 2016

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