HomeGet started

PreviousNext

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

Network-model records and how they relate
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.
Network-model records the four maps draw, with readiness, origin, and use
RecordStatusOriginMapsWhat it is
LineSufficientProcessedAll four mapsName, colour, and mode for each line.
StationProcessProcessedAll four mapsA station’s identity and coordinates.
StationHubSufficientProcessedAll four mapsStations that count as one interchange.
ServicePatternSufficientProcessedAll four mapsThe ordered stations a service calls at.
PatternCallSufficientProcessedAll four mapsOne stop on a pattern, in order.
PhysicalPathOSM unique-track (all rail modes)ProcessProcessedGeographicSimplified track geometry. Geographic map only.
PatternPathMatchUnderground (89/96 relations), Tram (8/10), DLR (5/12)ProcessProcessedGeographicWhich OSM track a passenger pattern follows.
PermittedMovementProcessProcessedAll four mapsWhich ways a train can continue through a junction.
MapProductPolicyAuthorAuthoredAll four mapsWhich 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.

SourceCoversWhen to use it
TfL Unified API via tfl-tsLines, stations, hubs, arrivals, statusEveryday boards and the three schematic maps. Free key.
TfL station-data GTFSStations, platforms, hubs, step-free pathwaysInterchange grouping and platform identity. No timetables.
OpenStreetMapTrack geometryGeographic maps. Already the basis of the simplified unique-track set.

Next

  1. 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.
  2. Author MapProductPolicy for the four maps — which patterns belong on a carriage diagram, a platform diagram, the Tube map, and the geographic map.
  3. 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.