[OSRM-talk] Preferring motorways for a route

Emil Tin ZF0F at tmf.kk.dk
Tue May 13 08:06:08 UTC 2014


You cannot change route type at run time. But if you want you can run several instances of osrm-routed in parallel, each computing a different type of route. Of course this requires more resource and time for preprocessing data.

To compute a different type of route, like preferring motorways you basically need to:


·         Modify car.lua to prefer motorway, or otherwise change the way types are handled according to your needs

·         Preprocess OSM data using your custom car.lua profile

·         Run osrm-routed to handle requests, passing in your preprocessed data

I agree a good wiki page on how to write lua profiles is missing.


Med venlig hilsen

Emil Tin
IT- og Processpecialist
Trafik
_______________________________
KØBENHAVNS KOMMUNE
Teknik- og Miljøforvaltningen
Byens Anvendelse

Njalsgade 13 Vær. 118
Postboks 380
2300 København S

Direkte

2369 5986

Mobil

2369 5986

Email

zf0f at tmf.kk.dk<mailto:zf0f at tmf.kk.dk>

EAN

5798009493149


[cid:image001.gif at 01CF6E92.762090C0]<http://www.sharingcopenhagen.dk/>

Fra: John Aherne [mailto:jjaherne at gmail.com]
Sendt: 13. maj 2014 09:57
Til: osrm-talk
Emne: [OSRM-talk] Preferring motorways for a route

Once again thanks for a really useful project.

I have been going through the archives to see if this subject has come up before.

I must admit I expected to see more questions about this.
But I have only found 1 oblique reference to being able to force a route to use motorways for a journey when it is possible. And I must admit I did not understand what it was referring to.

It seemed to imply that a simple tag passed in to a request would do the trick.

Now I think I must somehow change the car profile to make this happen. But I do not see much information on where I should start and whether this has been done before and I just have not been able to find it.
Any help would be most appreciated.
Thanks
John Aherne

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20140513/11cfd9a9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 4037 bytes
Desc: image001.gif
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20140513/11cfd9a9/attachment-0001.gif>


More information about the OSRM-talk mailing list