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

[email protected]<mailto:[email protected]>

EAN

5798009493149


[cid:[email protected]]<http://www.sharingcopenhagen.dk/>

Fra: John Aherne [mailto:[email protected]]
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

_______________________________________________
OSRM-talk mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/osrm-talk

Reply via email to