-
Notifications
You must be signed in to change notification settings - Fork 1
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
Bug: realtime parser returns duplicate vehicles #8
Comments
Started working on this in https://github.com/jamespfennell/gtfs/tree/duplicate-vehicles |
Ahhhhh the root cause is pretty subtle. When we're parsing entities we de-duplicate vehicles using a map keyed on
The problem is that even if the values of the
and interpret a field being |
To get the fix for jamespfennell/gtfs#8
Great catch, thanks so much for fixing this! |
When I parse the most recent GTFS realtime feed for the NYC L train I see many duplicate vehicles in the result. One vehicle has
IsEntityInMessage: false
and the other hasIsEntityInMessage: true
. Presumably the parser sees the first vehicle attached to aTripUpdate
and the second attached to aVehiclePosition
. It should de-duplicate these - in fact, theIsEntityInMessage: false
vehicle should just be dropped in this case.Observed after jamespfennell/transiter#110 was submitted to Transiter mainline. In Transiter I see lots of debug logging warning of duplicate vehicles in the NYC subway feed, and I think the root cause is here.
CC @cedarbaum.
The text was updated successfully, but these errors were encountered: