Opentransportdata.swiss

Departure/arrival display - Daten | Open-Data-Plattform öV Schweiz

The departure/arrival display’s API allows you to search for the departures/arrivals from/to a stop at a specific time. Real-time information is given where applicable.


This is a companion discussion topic for the original entry at https://opentransportdata.swiss/dataset/aaa

Today I received an unknown train from the API.
Here is the request:

<?xml version="1.0" encoding="UTF-8"?>
<Trias version="1.1" xmlns="http://www.vdv.de/trias" xmlns:siri="http://www.siri.org.uk/siri" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <ServiceRequest>
        <siri:RequestTimestamp>2016-06-27T13:34:00</siri:RequestTimestamp>
        <siri:RequestorRef>EPSa</siri:RequestorRef>
        <RequestPayload>
            <StopEventRequest>
                <Location>
                    <LocationRef>
                        <StopPointRef>8507000</StopPointRef>
                    </LocationRef>
                    <DepArrTime>2017-08-10T17:05:44</DepArrTime>
                </Location>
                <Params>
                    <NumberOfResults>1</NumberOfResults>
                    <StopEventType>departure</StopEventType>
                    <IncludePreviousCalls>true</IncludePreviousCalls>
                    <IncludeOnwardCalls>true</IncludeOnwardCalls>
                    <IncludeRealtimeData>true</IncludeRealtimeData>
                </Params>
            </StopEventRequest>
        </RequestPayload>
    </ServiceRequest>
</Trias>

Here is the response:

<?xml version="1.0" encoding="UTF-8"?>
<Trias xmlns="http://www.vdv.de/trias" version="1.1">
    <ServiceDelivery>
        <ResponseTimestamp xmlns="http://www.siri.org.uk/siri">2017-08-10T15:05:48Z</ResponseTimestamp>
        <Status xmlns="http://www.siri.org.uk/siri">true</Status>
        <MoreData>false</MoreData>
        <Language>de</Language>
        <DeliveryPayload>
            <StopEventResponse>
                <StopEventResult>
                    <ResultId>ID-0093EB07-62B6-4C2E-A928-4C81CFE6A3FD</ResultId>
                    <StopEvent>
                        <PreviousCall>
                            <CallAtStop>
                                <StopPointRef></StopPointRef>
                                <StopPointName>
                                    <Text></Text>
                                    <Language>DE</Language>
                                </StopPointName>
                                <StopSeqNumber>1</StopSeqNumber>
                            </CallAtStop>
                        </PreviousCall>
                        <ThisCall>
                            <CallAtStop>
                                <StopPointRef>8507000</StopPointRef>
                                <StopPointName>
                                    <Text>Bern</Text>
                                    <Language>DE</Language>
                                </StopPointName>
                                <ServiceDeparture>
                                    <TimetabledTime>2017-08-10T15:04:00Z</TimetabledTime>
                                    <EstimatedTime>2017-08-10T15:05:00Z</EstimatedTime>
                                </ServiceDeparture>
                                <StopSeqNumber>2</StopSeqNumber>
                            </CallAtStop>
                        </ThisCall>
                        <OnwardCall>
                            <CallAtStop>
                                <StopPointRef></StopPointRef>
                                <StopPointName>
                                    <Text></Text>
                                    <Language>DE</Language>
                                </StopPointName>
                                <StopSeqNumber>3</StopSeqNumber>
                            </CallAtStop>
                        </OnwardCall>
                        <Service>
                            <OperatingDayRef>2017-08-10</OperatingDayRef>
                            <JourneyRef>odp:42006:Y:H:j17:65532:72528</JourneyRef>
                            <LineRef>odp:42006:Y:H</LineRef>
                            <DirectionRef>outward</DirectionRef>
                            <Mode>
                                <PtMode>rail</PtMode>
                                <RailSubmode>unknown</RailSubmode>
                                <Name>
                                    <Text>IR</Text>
                                    <Language>DE</Language>
                                </Name>
                            </Mode>
                            <PublishedLineName>
                                <Text>IR</Text>
                                <Language>DE</Language>
                            </PublishedLineName>
                            <OperatorRef>odp:11</OperatorRef>
                            <OriginStopPointRef>-1</OriginStopPointRef>
                            <OriginText>
                                <Text></Text>
                                <Language>DE</Language>
                            </OriginText>
                            <DestinationStopPointRef>-1</DestinationStopPointRef>
                            <DestinationText>
                                <Text></Text>
                                <Language>DE</Language>
                            </DestinationText>
                        </Service>
                    </StopEvent>
                </StopEventResult>
            </StopEventResponse>
        </DeliveryPayload>
    </ServiceDelivery>
</Trias>

As you can see from the response, nothing is defined. I suppose this is an Erzatzug, but would be good if you can fix it.

Hi, it’s possible to add this data in GIS?

Hi Pablo
(1) We suggest you use OJP and not TRIAS
(2) It is a bit unclear to me, what you want to do in the GIS. OJP and TRIAS are requests per stop. So you can’t just do it for all 65’000 stops (exceeds quota). Can you explain your use case and we can tell you, how to do it? Pls use opendata@sbb.ch to send us the description.
Kind regards
Matthias