User guide 0

User guide

This site compares Switzerland's official public transport data with OpenStreetMap (OSM) and shows where they disagree, so that mappers can fix OSM and data stewards can correct the official data. On a regular schedule, every hour by default, it reads ATLAS, the Federal Office of Transport's registry of stops, the GTFS timetable from opentransportdata.swiss and the current OSM data. It matches each ATLAS platform with the OSM elements that represent it, compares the timetable's lines with OSM routes, and lists every disagreement as a problem. The public site is atlas.osm.ch.

For users

The map

The site opens on the map, which shows every ATLAS platform and OSM stop with its match.

The map of the site around Rapperswil station, with the search, the filters, the matched share, the legend, a matched pair and an unmatched ATLAS platform marked

Look at the numbers in the picture:

  1. Search a stop by its name or an identifier.
  2. Filter the stops by dataset, by match state or by problem.
  3. The share of OSM stops and ATLAS platforms that are matched, and the filters in use.
  4. The legend names the marker colours.
  5. A matched pair: an ATLAS platform (blue) joined by a line to its OSM stop (green). Click a marker for its popup.
  6. An ATLAS platform without a match (red). The Problems page lists them.

How the project works

How the project works Public sources enter the matching engine (osm-public-transport-matcher) through format adapters and a dataset profile. Its source-neutral core matches stops, compares routes and detects problems, then writes a versioned result bundle. The review application (stop_sync_osm_atlas) runs a pinned engine release on a schedule, imports each bundle and shows it on a website; other sites and scripts can use the same bundle. Reviewers use the findings to fix OpenStreetMap and report ATLAS issues. SOURCES ATLAS Swiss stop registry Swiss GTFS timetable Any GTFS feed other datasets OpenStreetMap XML extract MATCHING ENGINE osm-public-transport-matcher Format adapters ATLAS · GTFS · OSM parse files into common records + your own adapter Dataset profiles Swiss · generic rules, thresholds Source-neutral core matches stops compares routes detects problems no files, network or database Result bundle versioned files stops, routes, problems Other sites other datasets or countries Scripts and research Review application stop_sync_osm_atlas own repository Flask, PostGIS, map UI imports each bundle runs a pinned engine release on a schedule reviewers fix OpenStreetMap and report ATLAS data issues data flow starts or calls people act on the findings Dashed boxes: possible further uses of the bundle.

  • The matching engine (osm-public-transport-matcher) downloads or reads the public sources, matches stops and routes, and detects data problems. It is a separate Python package in its own repository of the same name, and needs no web server or database. Format adapters turn each source (ATLAS, any GTFS feed, OSM) into common records, a dataset profile sets the matching rules, and a source-neutral core does the matching (E1).
  • It writes a result bundle: a versioned directory of files containing every match, unmatched stop, problem and route comparison. The bundle is the only data that passes from the engine to the application.
  • The review application (stop_sync_osm_atlas) imports each bundle into a PostGIS database and presents it on a website: a map, a problems page, route comparisons, statistics and reports. Its scheduler runs a pinned engine release on a schedule (every hour by default) and publishes each new result as one database snapshot. Other sites and scripts can read the same bundle format.
  • Reviewers can use the findings to fix OpenStreetMap and to report issues in ATLAS. Each run reads the latest data from every source, so corrected stops drop off the problem list.

Official data and OSM describe the same stops very differently. The figure follows one stop with two platforms through the three datasets.

One stop in three datasets An illustrative stop with two platforms. In OpenStreetMap each platform is a pair of nodes: a platform node and a stop position on the road. ATLAS has one record per platform, identified by a SLOID and sharing the station UIC number. GTFS has one stop per platform; in the current Swiss feed its stop_id is the SLOID. The project groups OSM nodes into stop units (1), links ATLAS platforms to OSM stops (2), maps GTFS stop_ids to SLOIDs (3) and pairs GTFS routes with OSM route relations (4). OPENSTREETMAP ATLAS GTFS TIMETABLE P S node 101 node 102 uic_ref=8591234 · local_ref=1 Platform 1 ch:1:sloid:91234:0:1 UIC 8591234 · designation 1 Stop ch:1:sloid:91234:0:1 served by route 31 P S node 103 node 104 uic_ref=8591234 · local_ref=2 Platform 2 ch:1:sloid:91234:0:2 UIC 8591234 · designation 2 Stop ch:1:sloid:91234:0:2 served by route 31 Route relation route=bus · ref=31 ordered stops and platforms Route 31 trips, grouped into itineraries ATLAS has no route records: routes are rebuilt from GTFS 1 2 3 4 P platform S stop position 1 OSM stop unit 2 stop match 3 identity 4 route match

The figure numbers the four links the project maintains from top to bottom. Link 2 is the main result; the other three make it reliable.

  1. OSM node ↔ OSM node. OSM often maps one platform as two nodes, a platform and a stop position on the road. Before matching, the engine groups such nodes into one OSM stop unit, so that both are matched together. See OSM grouping.
  2. ATLAS platform ↔ OSM stop. Each official platform is matched to the OSM element or elements that represent it, by a fixed sequence of matching rules: shared identifiers, names, routes and distance. See E2 Matching process.
  3. GTFS stop_id ↔ ATLAS SLOID. Routes come from the GTFS timetable, which identifies stops by stop_id. The engine resolves every stop_id to an ATLAS SLOID, so that a route's stops can be compared with OSM. See E1.2 GTFS and ATLAS.
  4. GTFS route ↔ OSM route relation. Whole lines and their directions are compared, using the resolved stop identities. Shared routes are also evidence for link 2: a nearby OSM node served by the same route and direction is very likely the same stop. See E3 Routes.

Where the datasets disagree, the engine records a problem: a matched pair that is too far apart, a stop without a counterpart, conflicting names or platform codes, duplicates, or a match that contradicts the route evidence. See E4 Problems.

Key statistics

These values come from the published dataset and update with every import.

Metric Value
ATLAS platforms —
OSM nodes —
OSM stop units —
ATLAS match rate —
Matched pairs (ATLAS ↔ OSM) —
Unmatched ATLAS platforms —
Unmatched OSM stop units —