Data model
The shared passenger network behind the four maps — station order, track, and which patterns each map shows.
Carriage diagrams, platform diagrams, the Tube map, and the geographic map share one passenger network: lines, stations, the patterns that run on them, and — for the geographic map — the tracks those patterns follow.
- TfL says which stations a service calls at, in what order. That is enough for the carriage map, the platform map, and the Tube map.
- OpenStreetMap says which metres of track a service runs on. That is what the geographic map draws, once a pattern is joined to a route by station membership rather than by snapping a station onto the nearest track.
- MapProductPolicy is authored here. No feed decides which patterns belong on a carriage map, a platform map, the Tube map, or the geographic map.
A public timetable is not required to draw these four maps. How often a pattern runs does not change station order or track.
Station name labels are a separate concern.
The model
Line ── ServicePattern ── PatternCall ── Station ── StationHub
│ │
└── PermittedMovement PhysicalPath ┘
(via consecutive PatternCalls) (via PatternPathMatch)
MapProductPolicy — which patterns each map shows- Line → ServicePattern → PatternCall → Station → StationHub
- ServicePattern → PermittedMovement (via consecutive PatternCalls)
- ServicePattern → PhysicalPath (via PatternPathMatch)
In-carriage and platform maps use the same records. Their difference is layout. The Tube map keeps the usual branches. The geographic map draws the tracks.
Status
- SufficientReady to draw.
- ProcessDerived from sources so it can be refreshed.
- AuthorWe decide what belongs on each map.
| Record | Status | Origin | Maps | What it is |
|---|---|---|---|---|
| Line | Sufficient | Processed | All four maps | Name, colour, and mode for each line. |
| Station | Process | Processed | All four maps | A station’s identity and coordinates. |
| StationHub | Sufficient | Processed | All four maps | Stations that count as one interchange. |
| ServicePattern | Sufficient | Processed | All four maps | The ordered stations a service calls at. |
| PatternCall | Sufficient | Processed | All four maps | One stop on a pattern, in order. |
| PhysicalPathOSM unique-track (all rail modes) | Process | Processed | Geographic | Simplified track geometry. Geographic map only. |
| PatternPathMatchUnderground (89/96 relations), Tram (8/10), DLR (5/12) | Process | Processed | Geographic | Which OSM track a passenger pattern follows. |
| PermittedMovement | Process | Processed | All four maps | Which ways a train can continue through a junction. |
| MapProductPolicy | Author | Authored | All four maps | Which patterns belong on a carriage map, a platform map, the Tube map, or the geographic map. |
Where it comes from
Line identity and station order come from TfL. Track geometry comes from OpenStreetMap, simplified for a map and joined to a pattern by matching the ordered stations on an OSM route relation. Inspect a line on Line topology.
| Source | Covers | When to use it |
|---|---|---|
TfL Unified API via tfl-ts | Lines, stations, hubs, arrivals, status | Everyday boards and the three schematic maps. Free key. |
| TfL station-data GTFS | Stations, platforms, hubs, step-free pathways | Interchange grouping and platform identity. No timetables. |
| OpenStreetMap | Track geometry | Geographic maps. Already the basis of the simplified unique-track set. |
Next
- Join Underground, DLR, and Tram patterns to OSM route relations by ordered station membership, replacing nearest-vertex snapping. This is what the geographic map needs to draw a branch correctly at a fork.
- Author
MapProductPolicyfor the four maps — which patterns belong on a carriage diagram, a platform diagram, the Tube map, and the geographic map. - Point the geographic map and the line / branch strips at this model.
See Map – Tube & Rail (Geo), Simple line strip, Branch strip — horizontal, and Branch strip — vertical.