OneBusAway/onebusaway-application-modules — pull request #58 by kurtraschke (2013-05-21 02:42:39+00:00)
Title: Preserve stop sequence values from GTFS so they can be matched to GTFS-realtime updates

OBA-internal data structures use their own stoptime indices, which are acceptable in almost all circumstances, as they preserve the order of stoptimes from the input GTFS feed. However, one case in which the original stoptimes may be needed is matching updates from a GTFS-realtime feed which uses `stop_sequence`, as described in issue #50.

This patch addresses the issue by preserving the original stop sequence in the OBA bundle, so it can later be used by the GTFS-realtime updater.

I have tested this against the YRT (http://yrt.ca/en/aboutus/gtfsdownload.asp) GTFS and GTFS-realtime feeds. Without the patch applied, some updates would fail with the "out of bounds" error, while with this patch applied, GTFS-realtime updates are applied cleanly.