Repository navigation
fix(transit): link only stops named like the place to its board - #731
Merged
Merged
Conversation
A place's board linked every stop within 1 km sharing one informative word with the place, so Köln Messe/Deutz took in Deutz's street stops and Köln-Mülheim most of Mülheim. Link a stop only when its name is the place's name, with or without its town, or when it names the station as its own.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #730. A place's departure board links stops by name, and the rule linked far too much. A stop within 1 km counted when it shared one "informative" word with the place. So "Köln Messe/Deutz" took in every Deutz stop: Suevenstraße, Koelnmesse, Im Rheinpark, Deutzer Freiheit, the Technische Hochschule. "Köln-Mülheim" took in most of Mülheim, and Stuttgart Stadtmitte took in Stuttgart Hauptbahnhof, 990 m away.
New rule. A stop within 1 km links when its name is the place's name: the same words in any order, after normalising spelling. Either name may leave out its town:
Beyond that, a stop links only when its name says it is the station's own stop and contains the place's name: "Köln Dom/Hbf" and "Köln Breslauer Platz/Hbf" for Köln Hauptbahnhof, and "Köln Bf Deutz/Messe LANXESS arena" for Köln Messe/Deutz. Sharing a district or a town no longer links.
Details:
Before (
main's rule): departures from Köln Deutz Im Rheinpark and Koelnmesse, which aren't part of the station.After: every departure leaves from the station or its "Bf Deutz/Messe" stop.
Both views come from a local web build against a local proxy (not committed):
main's or this branch's rule.With
main's rule the board had 643 departures, about half from those other stops; with this branch's it had 266. The "before" capture also shows the "Some departures may be missing" warning. The proxy didn't log per-stop lookups, so I can't say which of its extra stops failed to load.Checked across Germany.
main, 945 with this branch.db-vendo) answered this machine withOPS_BLOCKED, so its spellings weren't in the probe. They follow the same patterns as the DELFI names Transitous returns.Validation:
New tests cover:
Four fail against
main's code. Two existing fixtures relied on the loose rule and now use names that link: the stop "Aachen Central" for the place "Aachen Hbf", and a bus stop "Köln Messe/Deutz Ottoplatz".Full Vitest run: 24,554 passed, 0 failed.
check-typespasses forapps/api;pnpm lint(Biome, Prettier, translations) is clean.Not run locally: the docs build. One paragraph of
public-transit.mdchanged and passes Prettier.Release and upgrade impact
Product impact: ordinary
No package release: neither
@openmapx/extension-clinor@openmapx/extension-contractsdepends on the transit integration. Built with and without this change, their JavaScript output is byte-identical (42 files). The only differing files areintegration.d.tsandlicensing-schema.d.ts, whose union members come out in a different order between builds of the same source. Repeated builds of this branch alone show the same variation.