mapbox / mapbox/nepomuk

Implement Station Look-Up

Open
#19 7 comments 0 reactions 0 assignees View on GitHub
Backend Feature Request
Dominant language
C++
Stars
24
Forks
7
PR merge metrics
No merged PRs in 30d

Description

To actually route in a public transportation network, we require the translation from location / query to stations.

I see a few different scenarios that we might want to support.

# Name To Station

## Similarity measures

Entering the name of a station, or parts of it, we should be able to find the best match in the data.

For any string `s` and station `S`, we need a function that determines the likelihood of `s` referring to `S`. We could use different synonyms (e.g. `S+U Stationname` and `Stationname`) to refer to the same station.

Similarity could further use techniques like stemming, phonetics matching or similar to distinguish between possible candidates.

A possible hint to further strengthen the look-up could be the distance to the GPS position.

## Selecting stations

User enters name 'n'. If name 'n' can be matched with a high enough certainty, we directly select the station. If the likelihood of many stations is high enough, we should output a sorted list of possible candidates.

### Possible Features

By supporting multiple likely results (staring at maybe like 2/3 characters), we could implement autocomplete.

# Location to Station

For the look-up location to station we would need integration with walking durations. What I imagine is a preselection phase to select a Pareto-set of possible connections. For every line we can select the nearest (maybe two nearest/maybe per direction?) stations.
Within a maximal walking radius, we can pre-filter a set of candidates.

These candidates then need to be checked for their walking distances. This could be done with a walking table query to OSRM/mapbox-directions.

This gives a set of initial data. Next to this initial data, we also require a check for the direct connection (if it is close enough) in walking.

After a search for the best connections, we can then augment our response by querying the walk-api for an actual set of walking instructions to the stations/from the stations.

/ cc @daniel-j-h

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Start by mapping the existing GTFS station and routing flow, then review the proposed OSRM/mapbox-directions and walk-api integrations. Before implementation, define the matching, candidate selection, walking-radius, and autocomplete acceptance criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend, search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.