Skip to main content

Module resolve

Module resolve 

Source
Expand description

From what the caller typed to a stop ID: an ID is used as it is, a name only if it names one stop. A wrong stop gives wrong connections that look right, so a doubtful name is an error with the candidates, never a guess.

The scores of the geocoder do not tell a good match from a bad one, so only the names count: a match whose name is the query (ignoring case, punctuation and spacing), else the only match that contains every word of the query. Matches with the same name in the same area, like the platforms of a station, count as one.

Constants§

MAX_CANDIDATES
The most candidates an Error::AmbiguousStop lists.

Functions§

choose
The stop query names among the geocoding matches.
coordinates
Coordinates LAT,LON, which the routing accepts as a place.
is_stop_id
Whether the input is a stop ID, like de-DELFI_de:06412:1_G, rather than a name.