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

No Method of mapping vehicle to trip_id #5

Open
jonathonwpowell opened this issue Nov 28, 2019 · 0 comments
Open

No Method of mapping vehicle to trip_id #5

jonathonwpowell opened this issue Nov 28, 2019 · 0 comments

Comments

@jonathonwpowell
Copy link
Owner

Currently there is no method of mapping a vehicle to a trip_id, as trip_id is not provided in the Transloc API.

Here are my ideas to create a generic way to create this mapping:

  • Add an optional parameter that points to a URL that will do the mapping
    • This endpoint will expect an array of vehicles, positions, timestamps, & routes
    • The endpoint will return the trip_id for each vehicle, or no trip_id if the endpoint knows the vehicle is not on a trip
    • While the endpoint could work in many ways, I imagine that it will try and match the vehicle to a trip_id, and then cache the result for a length of time or until values changed.
    • This method of having a separate endpoint do the mapping allows this project to remain stateless, as well as allow for other data that may be agency specific to be added in
  • Before mapping to the gtfs-rt format, if the url is passed in it will call it. It will then add the trip_id to all of the vehicles, or remove them if they have no trip_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant