motis-project / motis

Intermodal Mobility Information System

Home Page:https://motis-project.de

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MOTIS MIV routing request

1Maxnet1 opened this issue · comments

To compare the needed time for a certain route of MIV and Public Transport, I wanted to create two requests (one for public transport routing through MOTIS and one for MIV). My question would be whether MOTIS is capable providing a way in it's API to route for MIV:

  1. I had a look at the API documentation, but could not find a MIV routing only option. I found the option to set the time for routing with the car in the beginning or at the end (e.g. for park+ride) but not for the whole route. Is this available/possible?
  2. alternatively I thought there is probably a OSRM/Valhalla running inside MOTIs anyway, if the module is enabled. Is their API exposed somehow or could I expose it through a configuration? Then I could also use an existing library to send some MIV routing requests to the OSRM/Valhalla server and do not need to implement MIV routing requests in my MOTIS-client.

This is the API:
https://github.com/motis-project/motis/tree/master/protocol/osrm

For APIs that are not documented on motis-project.de please always check the protocol directory. The APIs that are not documented are considered more like an implementation detail and are therefore not as "stable" as the documented ones. Not that those documented ones will never change, but we are more aware that people are using those APIs and will try to make an effort to keep them a bit more stable. In case of OSRM, the API didn't change since its first implementation around 2015, so I guess it's fine.

The original OSRM/Valhalla APIs are currently not available via MOTIS. I guess it would be possible to expose them, if needed. But we're using old versions of OSRM anyway. So my guess would be that the API changed since then. In this case, I would just setup a separate OSRM instance if you need the OSRM API.

This is the API: https://github.com/motis-project/motis/tree/master/protocol/osrm

For APIs that are not documented on motis-project.de please always check the protocol directory. The APIs that are not documented are considered more like an implementation detail and are therefore not as "stable" as the documented ones. Not that those documented ones will never change, but we are more aware that people are using those APIs and will try to make an effort to keep them a bit more stable. In case of OSRM, the API didn't change since its first implementation around 2015, so I guess it's fine.

The original OSRM/Valhalla APIs are currently not available via MOTIS. I guess it would be possible to expose them, if needed. But we're using old versions of OSRM anyway. So my guess would be that the API changed since then. In this case, I would just setup a separate OSRM instance if you need the OSRM API.

Thanks for the in-depth answer. I will discuss this in our team and report back / close the issue, when we decided on a solution.

Perfect!

I just wanted to add: just because it's a Flatbuffer specification file, it can still be used with JSON (like all the other endpoints). You can either use the example (e.g. here) or try to use the OpenAPI description and generate a client for your programming language.