About Mind the Gates
Live closure forecasts for every active barrier crossing on the GB rail network that we can match to a train route, driven by Network Rail's open timetable + movement feeds.
How it works
Network Rail publishes the GB train timetable daily as JSON-CIF. We pull the FULL snapshot plus that day's incremental UPDATE every 6 hours, expand each schedule's booked stops into its physical route across the BPLAN graph (Dijkstra between consecutive timed TIPLOCs), and pre-index every edge a train traverses.
Each crossing is bound to the BPLAN edges that pass within 500 m perpendicular distance, with a per-edge fraction giving its position along the segment. To predict a closure we take the two booked TIPLOC times bracketing the crossing's edge and interpolate the pass time linearly between them. The barrier-down window around that pass time is type-aware: automatic, signaller-controlled, and miniature-warning-light crossings get their own conservative lead-in and clear-out, set from signalling standards rather than per-crossing measurement.
Three Network Rail STOMP feeds layer live state on top of the snapshot:
- TRUST shifts each prediction by the train's latest reported delay, drops cancelled services (msg 0002), and flags trains TRUST hasn't activated as no-shows once they're past their booked origin departure plus a category-specific grace.
- VSTP brings in ad-hoc schedule additions and cancellations — mostly freight and engineering trains added hours before they run — so they appear in the timeline without waiting for the next CIF refresh.
- TD (Train Describer) watches each crossing's protecting signals via SMART berth-step data. While any protecting berth is occupied, that crossing's barriers are observed-down; the "longest closure so far today" line in each crossing page's About section is timed from these events (with the same per-type margins at the window edges) rather than from the schedule.
- The imminent-arrival overlay turns those same berth steps into forecasts. A train seen in a crossing's approach section is marked approaching — it will pass within one berth transit, whatever the timetable says — and a train one section further out gives several minutes' more warning — the learnt transit time for that crossing and train class. Transit times self-calibrate per crossing, direction, and train class (express / stopping / freight). This is how unscheduled trains — engineering moves, ad-hoc freight with no published schedule — still show up before the barriers drop.
Data sources
Almost all open data, licensed under the Open Government Licence v3.0:
- CIF SCHEDULE — daily train timetable (FULL + UPDATE). Network Rail Open Data.
- TRUST — live train movement, activation, and cancellation events. Network Rail Open Data.
- VSTP — very-short-term-planning schedule additions / cancellations. Network Rail Open Data.
- TD_ALL_SIG_AREA — live Train Describer berth-step feed. Network Rail Open Data.
- SMART — signal-level berth layout used to map crossings to protecting signals. Network Rail Open Data.
- BPLAN Geography — rail network graph with TIPLOC coordinates (Open Rail Data wiki). Network Rail Open Data. Augmented by a locally generated gap-filler overlay derived from NR GIS route data, and a vendored community TIPLOC coordinate table (MIT-licensed, largely FOI-sourced) to fill remaining gaps.
- CORPUS — TIPLOC ↔ STANOX ↔ CRS reference. Network Rail Open Data.
- NR active level crossings — register of every active crossing with type, ELR mileage, and lat/lon. Network Rail.
- OS National Grid transforms — Helmert + Transverse Mercator. Ordnance Survey.
Mind the Gates is not affiliated with, endorsed by, or supported by Network Rail, the Rail Delivery Group, or any train operator. "Network Rail" and operator names are used here factually for attribution only.
Known limitations
- Observed barrier-down times and the imminent-arrival overlay depend on SMART signal coverage — just over a third of listed crossings have at least one protecting berth mapped. The rest fall back to the schedule-based prediction.
- Type-aware lead/clear is still a single number per crossing type rather than per-crossing calibration; actual barrier timing varies with train class and local trigger placement (per-class calibration from observed closures is in progress).
- Unscheduled trains only appear once the wire sees them approaching — typically a few minutes ahead, less at crossings whose approach timings we haven't learnt yet. Earlier than the barriers, but far less notice than timetabled services get.
- Activations that fire while the process is down are lost (brief reconnect gaps are replayed by the broker), so after a restart without recent saved state the first ~20 minutes err on the side of showing the schedule rather than flagging no-shows.
- Footpath, user-worked, and open crossings have no signaller-controlled closure to predict, so they aren't listed and have no pages here (user-worked crossings with miniature warning lights are listed — their lights are railway-controlled).
- Crossings whose BPLAN match falls outside the 500 m perpendicular
cutoff are flagged
no_edge_in_rangeand hidden by default — about 2% of the NR register.
Common questions
How do I know if a level crossing is about to close?
Each crossing page shows a live status and a 30-minute forecast, built from Network Rail's timetable and live train-movement feeds, so you can see the next predicted barrier-down before you set off.
What do the crossing types like AHB, MCB and CCTV mean?
AHB is an automatic half-barrier, MCB a manually-controlled barrier, and CCTV a manually-controlled barrier monitored by remote camera. The type sets how long the barriers are typically down before a train passes.
How accurate are the forecasts?
We measure it rather than guess: every day each crossing's page is scored against the train passes actually observed on the railway, and the results — how often a pass had advance warning, how often warnings came true, and the typical timing error — are published on the accuracy report. Forecasts can still be wrong, so always follow the signals and barriers at the crossing itself.
Which level crossings are covered?
Every active barrier crossing on the GB rail network that we can match to a train route — around 1,600 crossings with railway-controlled closures or warning lights. Browse them by region or search by name from the home page.
Spotted something off?
If a prediction doesn't match what you saw at the crossing, the "Is this right?" button on that crossing's page logs it with the exact time and place — or get in touch with the crossing, the time, and what actually happened.