-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Possible: support date-range-based OTP Index queries (e.g. getting ‘active’ stops/routes for specific date(s)) #4879
Comments
@fpurcell @miles-grant-ibigroup Could you flesh out the requirements for this a little more? In particular:
|
The API already returns the service days of each pattern (and therefore route) so either filtering in the frontend or inside OTP will not be very hard. The vector tiles are a bit more tricky and I will have a think about how to achieve this. |
And would @miles-grant-ibigroup implement this in otp-ui or would you do it yourself @fpurcell ? |
At this point, it would be @miles-grant-ibigroup. Future TriMet app, it might folks that work here. But even then, development on a custom app would probably leverage most of the map and route functionality via the OTP-UI library component (e.g., which is more Miles' code). |
@fpurcell Picking this up again today. @miles-grant-ibigroup Looking at https://rtp.trimet.org/rtp/#/route/CTRAN:048 the line geometries appear to be drawn based on the |
@fpurcell Should the actual list of routes also be filtered by date or just the patterns inside of it? Would it be bad to have an element in the list which has zero pattern geometries because all of them are outside the current week? |
The query would then look like this:
|
Hey Leonard, the list of routes presented should filter on date as well, ala only one version of the line 94 is active at a given time: I guess the front end could look at the 'points' attribute and decide whether to render the route name. But seems better if the api simply filters out such routes. p.s., in cases like this (where the route or direction name change at some date), TriMet's feed will have a route_id=94 and route_id=94b to differentiate the two versions. |
@fpurcell All of this filtering could be done in the frontend but we want to make it convenient to do so, that's why we are moving it to the server. |
I am not sure i understod everything here, and there might be som small details to flush out as well. My understanding of
Examples
"active-date" is not a formalized term. "running-date" is also used in OTP. In general it is easier if we choose one, and stick with it. |
If we want to list all services(trip/patterns/lines/stoptimes) witch is active/running inside a period of time, I suggest listing all entities with at least one boarding or alighting inside the period. |
Short, service-dates should not be used to list out "running" services in a period. To make a fast and performant API we might have to limit the period resolution (only whole dates) or max lenght (8 days?). |
@miles-grant-ibigroup @fpurcell I'm going on holiday soon but to give you something to test while I'm gone I have opened #6003 . This gives you the ability to filter the vector tile stops by the current service week. If you compile that branch and modify the config like this https://github.com/leonardehrenfried/otp2-setup/blob/main/portland/router-config.json#L42-L49 you can activate the filter. Please note that it's very likely that the exact config will change as the PR goes through code review. I've chosen this config as it was easy to implement but I expect it not to stay the same. |
@miles-grant-ibigroup @fpurcell I believe the OTP part has been completed by this PR: #6003 Therefore I'm closing this ticket. If that was a mistake then please re-open it. |
No description provided.
The text was updated successfully, but these errors were encountered: