Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Walk time is 'null' in response, but is shown as a valid value on search.ch #206

Open
swiss-knight opened this issue Apr 24, 2020 · 2 comments

Comments

@swiss-knight
Copy link

Hi,

I have specially constructed a trip to check for large walks before reaching the very first public transport. I've noticed that the walk duration in the first section of this trip (which is only done by foot to reach the transportation stop) is shown as null with the Open Data Transport API:

http://transport.opendata.ch/v1/connections?from=Ch%C3%A2teau+d%27Oex%2C+Route+du+Mont+137&to=Vevey&via=&date=2020-06-22&time=07%3A00&isArrivalTime=0&limit=4&page=&direct=0&sleeper=0&couchette=0&bike=0&accessibility=

image

But that the exact same query, when executed directly on search.ch actually shows this walk duration:

https://timetable.search.ch/Ch%C3%A2teau-d%27Oex,Rte-du-Mont-137..Vevey?time=07.00&date=Mon+06%2F22%2F2020&toggle=v1

image

I also noticed that these 65 minutes correspond, indeed, to the difference between these two values in the Transport API response:
json_response['connections'][0]['sections'][0]['departure']['departureTimestamp']
and
json_response['connections'][0]['sections'][0]['arrival']['arrivalTimestamp']

Thanks for taking a look.
Regards.

@fabian
Copy link
Member

fabian commented Apr 24, 2020

Interesting… would you be able to put together a pull request to calculate the walking time for this special case?

@helbling
Copy link

corresponding api call:
http://fahrplan.search.ch/api/route.json?from=Ch%C3%A2teau-d%27Oex,%20Rte%20du%20Mont%20137&to=vevey

[..]
      "legs": [
        {
          "departure": "2020-04-27 10:08:00",
          "isaddress": true,
          "name": "Château-d'Oex, Rte du Mont 137",
          "type": "walk",
          "terminal": "Château-d'Oex",
          "runningtime": 3900,
          "exit": {
            "arrival": "2020-04-27 11:13:00",
            "stopid": "8501394",
            "x": 576404,
            "y": 147085,
            "name": "Château-d'Oex",
            "sbb_name": "Château-d'Oex",
            "waittime": 0
          },
          "type_name": "Fussweg"
        },
       [..]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants