Advice on how to connect to Network Rail Feeds.

140 views
Skip to first unread message

Dereck Jones

unread,
Jan 22, 2018, 4:46:31 AM1/22/18
to A gathering place for the Open Rail Data community
Hi all,

First time here after reading so many on line documents I am now in a state of confusion as to which method to choose to connect to a rail data feed.

I aim is to collect rail data for named railway station and display that data on a display screen like those at any railway station.

I have the following:

Network Rail developers account and a Transport API developers account.

Do I need both, if not which one should I be using?

From what I have read I have found this very confusing so any help or guidance would be very helpful.

Regards,

Dereck

Peter Hicks

unread,
Jan 22, 2018, 5:14:57 AM1/22/18
to Dereck Jones, A gathering place for the Open Rail Data community
Hi Dereck

You probably want the Live Departure Boards Web Service - http://wiki.openraildata.com/index.php/NRE_Darwin_Web_Service_(Public) - this is an API that'll let you request the arrivals and departures for a specific station.



Peter

--
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 post to this group, send email to openrail...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


OpenTrainTimes Ltd. registered in England and Wales, company no. 09504022.
Registered office: 13a Davenant Road, Upper Holloway, London N19 3NW

Dereck Jones

unread,
Jan 22, 2018, 7:31:28 AM1/22/18
to A gathering place for the Open Rail Data community
Hi Peter,

Many thanks for your pointer, I will go down that route.

Dereck

Dereck Jones

unread,
Jan 22, 2018, 9:20:39 AM1/22/18
to A gathering place for the Open Rail Data community
Hi Peter,

One last question.

After creating an account forOpenLDBWS and successful downloading some test data to my browser is that data in XML format ?

The reason I ask is the data does not look like XML format, example:

stdClass Object
(
    [GetStationBoardResult] => stdClass Object
        (
            [generatedAt] => 2018-01-22T14:12:00.201867+00:00
            [locationName] => London Paddington
            [crs] => PAD
            [platformAvailable] => 1
            [trainServices] => stdClass Object
                (
                    [service] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [std] => 14:10
                                    [etd] => On time
                                    [operator] => Heathrow Express
                                    [operatorCode] => HX
                                    [serviceType] => train
                                    [serviceID] => GATN+KaEXulZdMf/0969tg==
                                    [rsid] => HX010000
                                    [origin] => stdClass Object
                                        (
                                            [location] => stdClass Object
                                                (
                                                    [locationName] => London Paddington
                                                    [crs] => PAD
                                                )

                                        )

                                    [destination] => stdClass Object
                                        (
                                            [location] => stdClass Object
                                                (
                                                    [locationName] => Heathrow Airport T5
                                                    [crs] => HWV
                                                )

                                        )

                                )
and so on.

Many thanks for your assistance.

Dereck

On Monday, January 22, 2018 at 9:46:31 AM UTC, Dereck Jones wrote:

Peter Hicks

unread,
Jan 22, 2018, 9:24:50 AM1/22/18
to Dereck Jones, A gathering place for the Open Rail Data community
Hi Dereck

It looks like you might be using PHP (stdClass) and rather than dumping the XML out to your browser, you're dumping a representation of the data structure because your code has already parsed it.  If so, you've got past the tricky stage of processing the SOAP response in XML to something you can work with already!


Peter

--
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 post to this group, send email to openrail...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages