HSLdevcom / digitransit-ui

Digitransit UI ("Reittiopas.fi")
https://www.reittiopas.fi/
Other
238 stars 132 forks source link

wrong "to stop" distance in near you #2569

Open aguiraf opened 5 years ago

aguiraf commented 5 years ago

This is more evident when clicking directly on a stop in the map, then "route from here": the nearyou panel should show lines passing trough the stop with a "to stop" distance = 0, but distance is often much more.

Those distances are coming from OTP GraphIndex.findClosestPlacesByWalking() https://github.com/HSLdevcom/OpenTripPlanner/blob/9dadd50eaf10e2b74bf8c6a4934a5317fb80837c/src/main/java/org/opentripplanner/routing/graph/GraphIndex.java#L401 which in turn lounches an Astar search. I did not do further investigation, but I noticed that the more the stop is far away from the graph vertex, the more the distance is wrong, see the image:

to-stop-distance

optionsome commented 5 years ago

The reason for it is most likely that OpenTripPlanner puts you on the wrong side of the street and crossing the street is not possible near that location.