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

MOTIS MIV routing request #430

Open
1Maxnet1 opened this issue Jan 18, 2024 · 3 comments
Open

MOTIS MIV routing request #430

1Maxnet1 opened this issue Jan 18, 2024 · 3 comments

Comments

@1Maxnet1
Copy link
Contributor

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.
@felixguendling
Copy link
Member

felixguendling commented Jan 18, 2024

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.

@1Maxnet1
Copy link
Contributor Author

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.

@felixguendling
Copy link
Member

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.

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

2 participants