water-fountains / proximap

a responsive Angular 6 web app for finding nearby fountains
https://beta.water-fountains.org
Other
16 stars 10 forks source link

in fountain details, add "minutes to walk/distance until public transportation stop" #36

Open ralfhauser opened 6 years ago

ralfhauser commented 6 years ago

probably solvable via WikiData or OSM

axel105 commented 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)

ralfhauser commented 6 years ago

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

ralfhauser commented 6 years ago

Rentenanstalt is only 252m and the next connections leaving are

http://transport.opendata.ch/v1/stationboard?id=8591317&limit=10

ralfhauser commented 6 years ago

or if opened in a target="_new" , show http://fahrplan.sbb.ch/bin/stboard.exe/dn?ld=std5.a&input=8591317&boardType=dep&time=now&selectDate=today&maxJourneys=5&productsFilter=1111111111&showAdvancedProductMode=yes&start=yes

mmmatthew commented 5 years ago

@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.

ralfhauser commented 5 years ago

Sure google maps could also be a good start - it is just not as open data as the transport API

ralfhauser commented 5 years ago

1) provide proper titles "navigieren" for both is certainly not yet it image

ralfhauser commented 2 years ago

https://fahrplan.search.ch/8591317?time_type=depart seems to be the new visualization provider