HSLdevcom / HSLdevcom/digitransit-ui
wrong "to stop" distance in near you
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 267
- Forks
- 145
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 75
Description
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:

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue in the near-you panel: click a stop on the map, choose “route from here,” and compare the displayed “to stop” distance for lines passing through it. Then inspect OTP’s GraphIndex.findClosestPlacesByWalking() at the linked source, including its A* search. Done means the distance to the selected stop is 0 when a line passes through that stop, including stops far from the graph vertex.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100