Linking GTFS2 trips to single bus stops
Hi Trafiklab,
I am trying to split the bus stops in Stockholm (from one rikshallplats to two single stops) AND link each of the stops to a trip in the GTFS2 data.
'GTFS2' provides bus hubs (rikshallplats) and trips and 'SL Hållplatser och Linjer 2' provides single stops but no trips. Hence, neither 'GTFS2' nor 'SL Hållplatser och Linjer 2' provide me with single bus stops AND trips.
Does SL publish GTFS that links all trips to the actual split stops? If so, we would be very keen to use that.
Thanks for your time and a good service - look forward to hearing from you.
Kind regards,
Clauidia
Följ inlägget
0
följare
Hi Claodia
SL has no GTFS feed which means that there is no easy way to get the data you are looking for.
One possible way is to use the SL reseplanerare 2 API and build a custom solution where you map a GTFS trip to a trip you get from SL reseplanerare 2. With the response from SL reseplanerare 2 you should have the necessary data to find out a single stop.
As you notice, there is no easy way to go.
Best regards
Daniel
Hi Daniel,
Thanks for your reply.
We've been making good progress on this and agree with you that "there is no easy way to go" 😀
To make the mapping 100% robust, we would need the link between trips (from 'GTFS2') and single stops (from 'SL Hållplatser och Linjer 2').
Is SL able to share this as open data?
Thanks for your help,
Claudia
Hi Claudia
The simple answer to your question is no, sl is not able to share this as open data.
So im sorry to inform you that there is no simple way to get a single stops.
Best regards
Daniel
SL has recently published two updated APIs: Reseplanere 2 and Realtid 4.
Could you let us know if any of these APIs enable us to allocate specific locations to single bus stops (i.e. on each side of the road as opposed to a bus hub in the middle of the road)?
Thanks,
Claudia
Im quite sure there is no new information about stops in the API's.
Mvh
Daniel
As majority of our users are requesting the single bus stops, it would be very helpful if you can definitively confirm the new API does not enable us to give them the information about split stops. I want to make sure we've done everything in our power to get our users what they need, and telling them we're "quite sure" it is not possible at this stage wouldn't satisfy them.
Thanks and best,
Claudia
If you want to get information about a single stop i would recommend using SL Hållplatser och Linjer 2. Here is an example call to get all StopPoint.
http://api.sl.se/api2/LineData.xml?model=StopPoint&key=[KEY]
<StopPoint xmlns="http://api.sl.se/api/pws">
<StopPointNumber>10373</StopPointNumber>
<StopPointName>Polhemsgatan</StopPointName>
<StopAreaNumber>10373</StopAreaNumber>
<LocationNorthingCoordinate>59.3300033152388</LocationNorthingCoordinate>
<LocationEastingCoordinate>18.0358600498950</LocationEastingCoordinate>
<ZoneShortName>A</ZoneShortName>
<StopAreaTypeCode>BUSTERM</StopAreaTypeCode>
<LastModifiedUtcDateTime>2014-06-03 00:00:00.000</LastModifiedUtcDateTime>
<ExistsFromDate>2014-06-03 00:00:00.000</ExistsFromDate>
</StopPoint>
<StopPoint xmlns="http://api.sl.se/api/pws">
<StopPointNumber>10374</StopPointNumber>
<StopPointName>Polhemsgatan</StopPointName>
<StopAreaNumber>10373</StopAreaNumber>
<LocationNorthingCoordinate>59.3303066756403</LocationNorthingCoordinate>
<LocationEastingCoordinate>18.0357450353143</LocationEastingCoordinate>
<ZoneShortName>A</ZoneShortName>
<StopAreaTypeCode>BUSTERM</StopAreaTypeCode>
<LastModifiedUtcDateTime>2014-06-03 00:00:00.000</LastModifiedUtcDateTime>
<ExistsFromDate>2014-06-03 00:00:00.000</ExistsFromDate>
</StopPoint>
You can see that you get two Polhemsgatan in this response, one on either side of the road.
Tl;dr
There is no additional information about stops in the new API's.
Mvh
Daniel
Appreciate your clarification that the new APIs don't provide new information on single bus stops and the trips that go through them.
Our issue is (see very first message in this thread) that we can get the single bus stops but not the trips that go through them. The only data that links trips and stops are the 'GTFS2' data set which links trips to rikshallplatser (i.e. one bus hub, not single bus stops).
Our users would really appreciate being able to get prices bus stop locations - hopefully, this information could eventually be incorporated in the GTFS2 data set.
Thanks for your help,
Claudia
But I agree with Claudia that the best thing would be to get detailed stop data per trip.
A similar thread can be found below, at that time SL forwarded the proposal I did to publish stop data on a trip level, I haven't heard anything myself tho.
https://kundo.se/org/trafiklabse/d/sls-linjer-som-vektordata/
Feel free to reach out if you think we can help out in anyway to improve the current data set.
Mvh
Daniel