[OSRM-talk] Working with profiles and routes

Johan Uhle johan at mapbox.com
Wed Oct 5 12:27:04 UTC 2016


Hi Pedro,

welcome to the OSRM community :)

Every osrm-routed instance can only do routing for one profile, not for
many.

In OSRM, you need extract and process the OSM road network with a profile
(in your case foot). Once that processing is done and you load the dataset
into osrm-routed, you can do queries against the server following the
profile used in processing (again, foot in your case).

If you want to do other queries (bicycle, car), then you need to run
processing of OSRM with these profiles as well and load them into own
instances of osrm-routed. We include the profile in the URL though, so that
users can themselves use a proxy like nginx to route requests to different
osrm-routed instances. There is no checking of validity of the profile
though, which is why you were able to do `profile=foot` requests against
the demo server. The demo server actually only supports the car profile
right now.

Best,
Johan



On Tue, Oct 4, 2016 at 11:19 PM, Pedro Luiz Cumino <pedro.cumino at gmail.com>
wrote:

> Hi all,
> I'm new in here.
>
> I'm trying to use the different lua profiles given by the project.
> Before running the project I used the following commands inside the
> '/build' directory in order to build the engine itself:
>
>    - osrm-extract -p ../profiles/foot.lua bremen-latest.osm.pbf
>    - osrm-contract bremen-latest.osrm
>    - osrm-routed bremen-latest.osrm
>
> At first, I made two requests with the same starting point and destination
> as shown below.
>
>    - http://router.project-osrm.org/route/v1/driving/13.
>    388860,52.517037;13.397634,52.529407;13.428555,52.523219?overview=false
>    <http://router.project-osrm.org/route/v1/driving/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219?overview=false>
>    - http://router.project-osrm.org/route/v1/foot/13.388860,
>    52.517037;13.397634,52.529407;13.428555,52.523219?overview=false
>    <http://router.project-osrm.org/route/v1/foot/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219?overview=false>
>
> However, the results given were exactly the same. Both JSON objects I
> received showed the same duration. I didn't change any profile yet. But I
> checked that there are different speeds. So there must be a difference at
> least in the route duration.
>
> Subsequently, after trying all the possible profiles, I realised that even
> if I request using a random string value, the result will always be the
> same.
>
> Even so, I tried to use the original project server in order to compare
> with the results given by the local server installed. The request URLs were:
>
>    - http://router.project-osrm.org/route/v1/foot/13.388860,
>    52.517037;13.397634,52.529407;13.428555,52.523219?overview=false
>    <http://router.project-osrm.org/route/v1/foot/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219?overview=false>
>    - http://192.168.1.4:5000/route/v1/foot/13.388860,52.517037;
>    13.397634,52.529407;13.428555,52.523219?overview=false
>    <http://192.168.1.4:5000/route/v1/foot/13.388860,52.517037;13.397634,52.529407;13.428555,52.523219?overview=false>
>
> In this case, both results were totally different. Even if I change the
> profile from 'foot' to 'driving', the result doesn't change. The result
> from the local server shows me 0 for both duration and distance. It also
> returns the string "{highway:cycleway}" as the name of all waypoints.
>
> The requests were all made by the browser.
> Am I missing something at the building procedure or during the requests?
>
> --
> Atenciosamente,
> Kind regards,
>
> Pedro Luiz Cumino.
>
> _______________________________________________
> OSRM-talk mailing list
> OSRM-talk at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/osrm-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20161005/dfa15b4b/attachment.html>


More information about the OSRM-talk mailing list