Open ralfhauser opened 6 years ago
http://transport.opendata.ch/v1/locations takes lat/long as input and gives back a list of nearby stations (name, coordinates, id and distance to the inputted location) as output. Furthermore, the station-ID is also compatible with the SBB app. http://transport.opendata.ch/v1/connections takes as input two stations, and emits the next connection between them. (For more: http://transport.opendata.ch/docs.html#locations, Christian Trachsler, 06.07.18)
so for Mosaikbrunnen take the decimal as per https://tools.wmflabs.org/geohack/geohack.php?params=47.36462247923_N_8.5378359801062_E_globe:earth&language=en
and the query http://transport.opendata.ch/v1/locations?x=47.364622&y=8.537836 gives e.g. id = 8591317 for Rentenanstalt http://fahrplan.sbb.ch/bin/stboard.exe/dn?ld=std5.a&input=8591317&boardType=dep&time=now&selectDate=today&maxJourneys=20&productsFilter=1111111111&showAdvancedProductMode=yes&start=yes
Rentenanstalt is only 252m and the next connections leaving are
http://transport.opendata.ch/v1/stationboard?id=8591317&limit=10
@ralfhauser Maybe a more versatile solution is a link to Google Maps routing, which combines walking and public transport and (surprisingly) gives better connections than SBB in some cases. e.g. this link: https://www.google.ch/maps/dir//'47.364622,8.537836'. On mobile, clicking the link opens the google maps app very conveniently.
Sure google maps could also be a good start - it is just not as open data as the transport API
1) provide proper titles "navigieren" for both is certainly not yet it
https://fahrplan.search.ch/8591317?time_type=depart seems to be the new visualization provider
probably solvable via WikiData or OSM