opentripplanner / OpenTripPlanner

An open source multi-modal trip planner
http://www.opentripplanner.org
Other
2.2k stars 1.03k forks source link

GTFS-Realtime Alerts #412

Closed novalis closed 13 years ago

novalis commented 13 years ago

Web API has the ability to read GTFS-Realtime formatted data, and have applicable alert data in-line with a trip's itinerary.

Design and implementation needed.

Here's TriMet's service: developer.trimet.org/ws/V1/FeedSpecAlerts/appid/270FE4740FD758B33BE454622?text=true

novalis commented 13 years ago

Initial work in 95feae531bd46e

fpurcell commented 13 years ago

Low priority compared to testing & bug fixes for 10/15...

Two problems I'm seeing:

  1. Alerts are getting cached, and never expunged (maybe the expunge is triggered on the end-datetime). That incremental behavior is probably wrong, because alerts will be removed or overridden by a new alert. The result is that we get both old & new alerts showing up. I'd expect that the better logic will be to reload all alerts on each new call to the service.
  2. Alerts are showing up on the wrong trip legs. I'm seeing alerts on walking legs. Also seeing alerts that belong to route 100 show up on route 200. See the two files below, one is the raw data, the other the itinerary from OTP.

https://github.com/openplans/OpenTripPlanner/blob/master/opentripplanner-webapp/src/main/webapp/js/otp/planner/test/alerts-2.json

vs.

https://github.com/openplans/OpenTripPlanner/edit/master/opentripplanner-webapp/src/main/webapp/js/otp/planner/test/alerts-2.xml

Also...please keep the deprecated note/text format around a bit longer....that's what I'm using for now...

novalis commented 13 years ago

Expunge should be triggered by the alert being missing in future updates; the code is there, but perhaps there is a bug.

I'll look into these issues.

novalis commented 13 years ago

(that commit won't fix the failed expunge; I'm going to look into that separately)

novalis commented 13 years ago

BTW, can you open new tickets for future gtfs-realtime bugs?