Skip to content
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

stop_headsign not available in Index API #2224

Closed
barslett opened this issue Mar 7, 2016 · 6 comments
Closed

stop_headsign not available in Index API #2224

barslett opened this issue Mar 7, 2016 · 6 comments

Comments

@barslett
Copy link
Contributor

@barslett barslett commented Mar 7, 2016

Trips may change headsign underway, and this is handled by the field stop_headsign, which seems to be handled well both in the model as well as in the Plan API. However, it seems as the field is left out of the Index API (it's missing in TripTimeShort). This seems to have been addressed in in #438 and #1301, with no indications of this having been solved.

We have run into a problem with this now. Because of new metro line patterns, some routes will change destination underway - and this needs to be reflected in the passenger information services, including departure times from stops.

Is there any known workaround?

For those interested in the Oslo Metro network, please see:
https://ruter.no/nyheter/ny-t-banehverdag-fra-3april/ - currently only in Norwegian.

@abyrd
Copy link
Member

@abyrd abyrd commented Mar 8, 2016

The TripTimes class has a headsigns String array field. I don't think there should be any problem returning this information, someone just needs to implement it. There does need to be a fallback from from stop headsign to trip headsign.

@hannesj
Copy link
Collaborator

@hannesj hannesj commented Mar 8, 2016

This is also on our agenda, so I can take a look at it at least for the GraphQL endpoint (which should fix also the REST API)

@abyrd
Copy link
Member

@abyrd abyrd commented Oct 13, 2016

Is this resolved now? I 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.

@barslett
Copy link
Contributor Author

@barslett barslett commented Oct 13, 2016

We are still using OTP 0.19 (where this doesn't work) and a workaround in production, but I have now checked the Index API in our test system vith OTP 1.0.0, and there, all headsign attributes are present and have the correct content. I have not checked GraphQL, so @hannesj should comment as well.

@barslett
Copy link
Contributor Author

@barslett barslett commented Oct 21, 2016

I have looked at it now in GraphQL, and it was missing in the definition of stopTimeType. Added it and will make a PR.

barslett added a commit to barslett/OpenTripPlanner that referenced this issue Oct 21, 2016
barslett added a commit to barslett/OpenTripPlanner that referenced this issue Dec 8, 2016
As discussed in opentripplanner#2224 , the headsign element is missing from GraphQL. Added by this PR.

Replaces PR opentripplanner#2358, which contained too much clutter.
@barslett
Copy link
Contributor Author

@barslett barslett commented Jan 8, 2017

Closing, as the issue is solved.

@barslett barslett closed this Jan 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.