Filter starting stops by line
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 24
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description

When selecting a location on the map (symbolised by the black cross), appropriate starting locations are within a certain walking radius around the position (gold circle).
It is rather likely that we will have to allow for rather long walking segments (a few minutes) at origin and destination. It is possible for a line to have multiple stops in that region.
In general, we shouldn't suggest walking to a far away station of the same line. But we don't want to consider all possible locations as source/target.
In this effort, we should filter all results we can request from a coordinate to stop look-up to keep a single stop per line. I.e. the closest one.
To implement this, we can go through the set of stops and keep a set of the lines we have seen so far. For every stop we check the lines departing at it. If any line is not in the set of known lines, we consider the stop an addition to our set.
Else, we discard the stop as duplication.
In our example from the beginning, this would be the red line.
The filter would need access to the lines per stop (stop-to-line lookup) and work on the results of the coordinate-to-stop lookup.
Contributor guide
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 tracing the coordinate-to-stop lookup and the stop-to-line lookup, then inspect how candidate stops are assembled. The change is done when results from a coordinate retain only the closest stop for each line while still supporting origin and destination lookups.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100