Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page describes the adjustments, additions and changes that have been made to the NeTEx traffic data that Samtrafiken will deliver to a limited number of timetable data consumers such as SJ. Some of the changes have also been introduced in Samtrafiken’s regular NeTEx exports.

...

When sending NeTEx sales data to Samtrafiken then only a subset of these additions should be used. For sending data to Samtrafiken, please refer to the documentation here: Samtrafiken NeTEx import and for special adjustments here: Special cases for sending sales data to Samtrafiken.

Stops file - _stops.xml - StopPlace

The <StopPlace> element has been extended with additional <KeyValue> elements in order to provide information concerning: interchanges, "Rikshållplats"-numbers and whether a stop is sellable or not.

...

Each of these values is interpreted as:

FromProducer:ToProducer:FromProductTransportMode:ToProductTransportMode:MinimumInterchangeTime

The value is taken from Samtrafiken's BRM-system, similar to what you can see here: https://brm.samtrafiken.se/showtimes?pta=-1&station=g%C3%B6teborg+centralstation.
The producer numbers in “FromProducer” and “ToProducer” refer to the producer responsible for sales, and prices and which is displayed to the public. This is the value “salesAuthorityNumber” on a Line (used to be called färdmedelsproducent in Petra).

...

Example values: CST for Stockholms Central Station, ÖSV,ÖSVI for Östersund Västra., ÖSV,ÖSVI for Östersund Västra.

Stops file - _stops.xml - GroupOfStopPlaces

Addition 2024-10-08

We have now added <GroupOfStopPlaces> elements to the stops-file. There are currently around 380 GroupOfStopPlaces in the file. They are created and maintained by the Traffic-data team at Samtrafiken.

The <GroupOfStopPlaces> element has been extended with two KeyValue> elements in order to provide information concerning the "Rikshållplats"-number and whether the GroupOfStopPlaces should be used in a sellable context or not.

A GroupOfStopPlaces that is marked as sellable would normally contain at least 2 sellable stops.

N.B: All of the referred stops in a sellable GroupOfStopPlaces do not have to be marked as sellable. Each stop has its own sellable-flag to determine if that particular stop is sellable.

The “Rikshållplats”-number of a GroupOfStopPlaces can be used just like the “Rikshållplats”-number from a StopPlace when sending a trip search request to the Hafas journey planner.

Below is an example, of the GroupOfStopPlaces “STOCKHOLM”.

Code Block
breakoutModewide
        <groupsOfStopPlaces>
            <GroupOfStopPlaces version="231007" id="SE:030:GroupOfStopPlaces:9091074000098000">
                <ValidBetween>
                    <FromDate>2023-10-07T00:00:00</FromDate>
                </ValidBetween>
                <keyList>
                    <KeyValue>
                        <Key>sellable</Key>
                        <Value>true</Value>
                    </KeyValue>
                    <KeyValue>
                        <Key>rikshallplatsNummer</Key>
                        <Value>740098000</Value>
                    </KeyValue>
                </keyList>
                <Name>STOCKHOLM</Name>
                <ShortName>STOCKHOLM</ShortName>
                <PrivateCode>98000</PrivateCode>
                <members>
                    <StopPlaceRef ref="SE:030:StopPlace:9021074000001000" version="231007"/>
                    <StopPlaceRef ref="SE:030:StopPlace:9021074000622000" version="231007"/>
                    <StopPlaceRef ref="SE:030:StopPlace:9021074001617000" version="231007"/>
                    <StopPlaceRef ref="SE:030:StopPlace:9021074004383000" version="231007"/>
                    <StopPlaceRef ref="SE:030:StopPlace:9021074012144000" version="231007"/>
                    <StopPlaceRef ref="SE:030:StopPlace:9021074020749000" version="231007"/>
                    <StopPlaceRef ref="SE:030:StopPlace:9021074023844000" version="231007"/>
                    <StopPlaceRef ref="SE:030:StopPlace:9021074024382000" version="231007"/>
                    <StopPlaceRef ref="SE:030:StopPlace:9021074035997000" version="231007"/>
                </members>
                <Centroid>
                    <Location srsName="WGS84">
                        <Longitude>18.058155</Longitude>
                        <Latitude>59.330139</Latitude>
                    </Location>
                </Centroid>
            </GroupOfStopPlaces>
        </groupsOfStopPlaces>

General data - _shared.xml

...

  • 276 - Skånetrafiken

  • 430 - Pågatåg

  • 258 - Blekingetrafiken

  • 253 - Östgötatrafiken

  • 608 - Östgötapendeln

The county numbers used are the ones defined by SCB for all 21 counties in Sweden. See the complete list here: https://www.scb.se/hitta-statistik/regional-statistik-och-kartor/regionala-indelningar/lan-och-kommuner/lan-och-kommuner-i-kodnummerordning/

Changed producers file - changes.csv

...