Level crossing up and down times

41 views
Skip to first unread message

chops16

unread,
May 31, 2026, 12:56:08 PM (18 hours ago) May 31
to A gathering place for the Open Rail Data community
Hello!

Is there a way to use the TD API/stream to work out when a level crossing is going up and down? There's some annoying ones in my town and I want to start saving historical data to potentially work out average closure times.

Thanks in advance!

Ben Woodward

unread,
May 31, 2026, 1:02:13 PM (18 hours ago) May 31
to openrail...@googlegroups.com
That would depend on which town and if your local line exposes level crossing data, and the type of level crossings.

--
You received this message because you are subscribed to the Google Groups "A gathering place for the Open Rail Data community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openraildata-t...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/openraildata-talk/c39dc615-e921-4cf8-8a7f-3393558d1418n%40googlegroups.com.

chops16

unread,
May 31, 2026, 1:10:42 PM (18 hours ago) May 31
to A gathering place for the Open Rail Data community
it is Egham in Surrey on the SWR line

Peter Hicks

unread,
May 31, 2026, 1:10:47 PM (18 hours ago) May 31
to openrail...@googlegroups.com
Hello

On Sunday, 31 May 2026 at 17:56, chops16 <chjkin...@gmail.com> wrote:

Is there a way to use the TD API/stream to work out when a level crossing is going up and down? There's some annoying ones in my town and I want to start saving historical data to potentially work out average closure times.

TL,DR: Yes, but it's really complex.  Make an FOI request to Network Rail to see if they have data first.

Yes, but you'll need lots of other bits of data:

  • Timetable - to know which services are planned
  • VSTP - to know when additional services are planned
  • (optional) TRUST to know when a train has been cancelled, amended or is running early or late
  • (optional) Darwin to know when a passenger train is not going to stop at a station before it fails to stop
  • Timing points before and after the crossing in both directions to know roughly when a train will pass
  • Line speed
  • Berth identities before and after the crossing
  • Knowledge of where the strike-in points for stopping and non-stopping services are

Be aware that some crossings are automatic and raise/lower barriers with the passage of trains, some are controlled and their barriers raised/lowered manually.  Some crossings are in a non-TD area so you won't see any berth data for them, some have S-Class bits indicating the crossing state but there are no officially released datasets to decode this, and 

Unless you want to do a deep-dive in to several areas of the railway without necessarily having much to show for it, just go with an FOI request initially.  Several people have tried this in the past and it falls under the banner of over-optimisation, where trying to be too precise in an output results in an increase in inaccuracy.


Peter

Andrew Larcombe

unread,
May 31, 2026, 3:19:44 PM (16 hours ago) May 31
to openrail...@googlegroups.com
I've looked at this with the same annoying level crossings the OP has in mind. I have the berth IDs etc, so in principle could use train passing as a proxy, but the problem we have is that depending on *handwavy* how busy the line is, the annoying crossings will actually stay down until the trains in stations further up and down the line have crossed, not the one in the immediate station.

I'm not sure if it's possible to decode something in the bitmaps in the s class messages (if present) for these berths, but it might just be easier to get a camera to point at the level crossing from a nearby house and run it through some computer vision software.



--
You received this message because you are subscribed to the Google Groups "A gathering place for the Open Rail Data community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openraildata-t...@googlegroups.com.

chops16

unread,
May 31, 2026, 3:40:45 PM (15 hours ago) May 31
to A gathering place for the Open Rail Data community
Using the TD api and a lot of analysing the data with exact timestamps, I think I've narrowed down to checking when the level crossings change (well, the Station Road and Pooley Green Road ones), just not to a specific state! I'll put in an FOI and see if they can provide anything more

DwayneDibley

unread,
May 31, 2026, 6:54:40 PM (12 hours ago) May 31
to A gathering place for the Open Rail Data community
I may be wrong but I don't think the B1 TD provides level crossing indications.

While there would be some correlation between the protecting signal for a level crossing showing a proceed and a CCTV level crossing being lowered, this on its own would not provide reliable timing for level crossing down time as the level crossing would be down before the the signal clears and would remain down after the signal has returned to danger. There may also be occasions when barriers are lowered but the signal is not cleared, such as during testing.

As for other types of level crossing, in some cases there isn't even a requirement for the level crossing to be lowered before the protecting signal is cleared, so this method would provide no assistance.

As peter mentioned, a lot of data would be needed to time a LC with TD data. So much so that I have yet to see it done accurately.

I would suggest an FOI specifically asking for the average down time would be your best bet. If you are looking for independent verification of this, I would say that the TD feed probably isn't the most reliable way of achieving this. Given what seems to matter in your case would be the time the wig wags show a flashing red, to the time barriers are raised, any data derived from the TD feed alone would not be able to accurately determine this. 
Reply all
Reply to author
Forward
0 new messages