Skip to content

Map: out-of-town stations sit at the station, not the city centre - #77

Merged
davd-gzl merged 4 commits into
mainfrom
fix/station-coords
Sep 30, 2026
Merged

davd-gzl merged 4 commits into
mainfrom
fix/station-coords

Conversation

@davd-gzl

@davd-gzl davd-gzl commented Sep 30, 2026 •

Copy link
Copy Markdown
Collaborator

3/10, low

On the map, Lyon St-Exupéry TGV sits in the middle of Lyon, 19 km from the airport. Eleven more stations outside their town sit at its centre or on another station, up to 11.5 km off: Nîmes Pont-du-Gard, Les Arcs-Draguignan, Besançon Franche-Comté TGV, Valence TGV, Valence Ville, Calais-Fréthun, Le Creusot TGV, Nurieux, Mâcon-Loché TGV, Montpellier Sud-de-France and Avignon Centre. St-Pierre-des-Corps shares one point with Tours and Marseille Blancarde with St-Charles, so the nearby search never offers one from the other, and Les Aubrais sits 2.8 km off.

A station missing from data/stations.json takes the position of the first city reference its name starts with, in matchCity, so LYON ST EXUPERY TGV. lands on Lyon. Aliases such as macon loche and saint pierre des corps pinned others to their town, and the VALENCE TGV entry held a point that is neither Valence station.

Each now has its own entry at the position SNCF publishes in its gares-de-voyageurs dataset, with the town kept as city so the Wikivoyage link still opens it. A new entry's city also takes the bare town key, so the Calais town row now carries the alias calais ville to keep Calais Ville at the town. Against that dataset, no station outside the Paris, Lyon and Lille groups sits more than 2.3 km from its real position, over the 175 of 199 whose name matched.

The name fallback stays, so a station added to the timetable later lands on its town again until it gets an entry.

@davd-gzl
davd-gzl merged commit 75b8ad2 into main Sep 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant