Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change vehicle profile on viaroute request in OSRM?

I am developing an application based on OSRM that provides distances in kms and minutes starting from a list of addresses.

I am using the request "viaroute" to get back the desired information. This is an example of request:

http://router.project-osrm.org/viaroute?loc=52.503033,13.420526&loc=52.516582,13.429290&instructions=true

The response message contains the tag "total_time" (representing the time needed to reach the destination point starting from the source point). This value is computed by using a set of parameter characterizing the vehicle type. I would like to change the profile of the vehicle type (for instance: truck) to compute the "total_time" considering the maximum speed allowed for vehicle type used (ex: set the max speed in highway street to 110 km/h and not 130 km/h).

Someone could help me for this issue?

Thanks in advance Fabio

like image 307
Baiso Avatar asked Dec 06 '25 18:12

Baiso


1 Answers

As far as I know a single OSRM instance can currently only support a single profile. That's why it is not possible to specify the profile via the API. Also, the official demo instance at router.project-osrm.org only supports the "car" profile.

If you need other profiles then take a look at the various other routing services for OSM. There are also various third-party OSRM instances with different profiles available, but I don't know any instance with a truck profile.

like image 120
scai Avatar answered Dec 08 '25 06:12

scai



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!