noi-techpark / odh-mentor-otp

5 stars 8 forks source link

Bike sharing not visible on client #45

Closed rcavaliere closed 3 years ago

rcavaliere commented 3 years ago

API provided by OTP returns an empty array of values

zabuTNT commented 3 years ago

After thi pull https://github.com/noi-techpark/odh-mentor-otp/pull/46 should work. In fact stations are now returned if you go here: https://otp.opendatahub.testingmachine.eu/otp/routers/openmove/bike_rental

but a graph rebuild is needed because I introduced the operational regions of bikesharing stations. And now the network value is not a generic "GBFS network" anymore:

{
    "id": "\"770559437\"",
    "name": "Bahnhof Untermais/Stazione Maia Bassa",
    "x": 11.1484266999202,
    "y": 46.6563591168723,
    "allowDropoff": true,
    "allowPickup": true,
    "networks": [
        "GBFS"   <---- this is wrong now.
    ],
    "bikesAvailable": 0,
    "spacesAvailable": 1000,
    "isFloatingBike": false,
    "isCarStation": false,
    "realTimeData": true
}

but distinct between BZ - ME - PAPIN as you can see in router-config.js https://github.com/noi-techpark/odh-mentor-otp/blob/development/router-config.json

or, otherwise, you can not rebuild the graph, but you have to add GBFS inside the "companies" in config.yml of the journey app: https://github.com/noi-techpark/odh-mentor-otp/blob/c5e15bf83cd32e81671e3e54055ea49b784bd101/journey/config.yml#L169-L172

rcavaliere commented 3 years ago

@zabuTNT thanks for the update, and also for your work and those of @stefanocudini @bertolla can you please rebuild the graph, so we can test this?

bertolla commented 3 years ago

I did so and they are visible now