<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div style="font-size: 17px;"><br></div><div style="font-size: 17px;">The lua scripts parses the various OSM tags and returns a single value: the speed. OSRM uses this speed as the only deciding factor (in addition to the length of the ways) when computing routes.</div><div style="font-size: 17px;"><br></div><div style="font-size: 17px;">So all you need to do is set the speed high on motorway (say 100 km/h), and low on all other types (say 10 km/h). If you also trunk roads over residential, put trunks at 10 and residentials at 5, etc. You will have to experiment to find settings that provide the type of routes you want.</div><div style="font-size: 17px;"><br></div><div style="font-size: 17px;">The only problem you will have is that the travel time will be incorrect. This is an unfortunately consequence of the fact that you cannot specifiy speed and impedance separately (yet). A workaround is to completely ignore the travel time OSRM provides, and calculate it yourself after after a route is returned, as distance/average_car_speed.</div><div style="font-size: 17px;"><br></div><div style="font-size: 17px;"><br></div><div style="font-size: 17px;">-Emil</div><div style="font-size: 17px;"><br></div><div style="font-size: 17px;"><br></div><div style="font-size: 17px;"><br></div><div style="font-size: 17px;"><div>On 13 May 2014, at 18:14 , Emil Tin <<a href="mailto:emil@tin.dk">emil@tin.dk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><br></div><div>it's right here: <a href="https://github.com/DennisOSRM/Project-OSRM/blob/develop/profiles/car.lua">https://github.com/DennisOSRM/Project-OSRM/blob/develop/profiles/car.lua</a></div><div><br></div><div><br></div><br><div><div>On 13 May 2014, at 17:38 , John Aherne <<a href="mailto:jjaherne@gmail.com">jjaherne@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div><div><div><div><div>Thanks for the replies.<br><br></div>I'll also take a look at the repo and see if they tell me what I need to do.<br><br></div>Although I did find via google a car.lua and could not see any obvious way to prefer motorways.<br>
<br></div>But I'll look again and see what I overlooked.<br><br></div>Thanks<br><br></div>John Aherne<br><br></div>
_______________________________________________<br>OSRM-talk mailing list<br><a href="mailto:OSRM-talk@openstreetmap.org">OSRM-talk@openstreetmap.org</a><br><a href="https://lists.openstreetmap.org/listinfo/osrm-talk">https://lists.openstreetmap.org/listinfo/osrm-talk</a><br></blockquote></div><br></div></blockquote></div><br></body></html>