HSLdevcom / HSLdevcom/digitransit-ui

wrong "to stop" distance in near you

Open
#2,569 1 comment 0 reactions 0 assignees View on GitHub

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:

to-stop-distance

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.