Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Routing using OSRM for multiple profiles - does profile in the URL actually do anything?

Tags:

osrm

With ORSM there are 3 profiles for different modes of transport, cycle, foot and car. These come with OSRM.

According to the following post which was made 1 year ago, OSRM does not support multiple profiles:

OSM routing (OSRM): do I need to duplicate all data for different profiles?

Yet in the official documentation there is a profile argument as part of the URL called for retrieving a route from a running OSRM instance:

http://project-osrm.org/docs/v5.6.4/api/#general-options

The path would look something like this:

http://router.project-osrm.org/route/v1/driving/

Without driving, foot or cycle in the URL a route won't be retrieved so one of them is required for the API, yet if I compile a route for car on the server, but then use /foot/ in the URL to retrieve a route, it will still retrieve a car based route, completely ignoring 'foot'.

Could anybody from OSRM explain why something as useful as multiple profile support has been withdrawn, and what the point of driving is in the above URL seeing as it is ignored anyway and just appears to use the profile attached to the running instance of OSRM?

The solution to the problem of multiple profiles appears to be to host parallel copies of the routing machine for each profile and address different IP's, so again, what is the point of 'profile' in the URL?

like image 321
Single Entity Avatar asked Mar 23 '17 08:03

Single Entity


1 Answers

Could anybody from OSRM explain why something as useful as multiple profile support has been withdrawn

The support has never been there. You will need to run separate osrm instances for each profile.

The URL option is merely there to make it easier to stick a nginx in front of your OSRM instances and distribute to the correct instance based on profile string.

We might implement multiple profiles in the same OSRM instance in the future, but this is still far out.

like image 160
themarex Avatar answered Nov 11 '22 10:11

themarex