-
Notifications
You must be signed in to change notification settings - Fork 0
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
Nearest departures ignores some stops #16
Comments
Could it simply be that there are very few departures from Sorgenfri? AFAIK only bus 24 stops there. Querying for departures from a place near Prinsens gate seems to give the expected results. |
I see. The query does the following: Given
So only the first departure for a given serviceJourneyID will be listed, in this example the one from Anton Grevskotts veg. I guess this can be problematic in some cases, like the one you listed. Maybe we should sort the departures by distance to |
Yeah I was about to say: maybe we should introduce haversine here |
I just pushed an update that sorts on distance to The build fails currently because of a type mismatch in @entur/sdk. It should be fixed once entur/sdk#154 gets merged |
FYI, related change: 9787558 Hm. Checking this out again now that it is deployed. Now it seems odd that departure time is random down the list. I was imagining something like this:
|
It's sorted by |
I saw a discussion on this around realtime, and I believe it is |
From a recent query:
|
Yeah, doesn't that confirm that |
Given any more thoughts on this, @torfjor ? |
@mikaelbr Maybe I'm missing something here, but |
Looks like some stops are ignored when searching for nearest departures. For instance, when searching from stop
Sorgenfri
, none of the actual departures from that stop is included, but the stops around is.See example:
I haven't looked into this much yet, just noting it here now as I found it.
I get that we probably need to be a bit more sophisticated with nearby at some point (both UI and business logic wise). Maybe it's due to me using the nearest endpoint and should use regular departure endpoints, though, but I think it still should show up?
The text was updated successfully, but these errors were encountered: