<div dir="ltr">Have a look at profiles/lib/handlers.lua - in there you will find handlers for certain situations, for example here for surfaces<br><div><div><div><br><a href="https://github.com/Project-OSRM/osrm-backend/blob/5.6/profiles/lib/handlers.lua#L275-L293">https://github.com/Project-OSRM/osrm-backend/blob/5.6/profiles/lib/handlers.lua#L275-L293</a><br><br></div><div>All handlers are getting called in order here<br><br><a href="https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/foot.lua#L200-L240">https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/foot.lua#L200-L240</a><br><br></div><div>and exit early if a handler returned false<br></div><div><br><a href="https://github.com/Project-OSRM/osrm-backend/blob/5.6/profiles/lib/handlers.lua#L505-L511">https://github.com/Project-OSRM/osrm-backend/blob/5.6/profiles/lib/handlers.lua#L505-L511</a><br><br></div><div>You can either add your own handler discarding ways completely or better penalize such ways by setting a high weight.<br></div><div>Then the routing engine will always find a way but prefer ways with your tracktype criteria.<br><br>Here's the Lua `result`'s attributes<br><a href="https://github.com/Project-OSRM/osrm-backend/blob/master/src/extractor/scripting_environment_lua.cpp#L309-L350">https://github.com/Project-OSRM/osrm-backend/blob/master/src/extractor/scripting_environment_lua.cpp#L309-L350</a><br></div><br>Make sure to test your profile locally on small extracts and / or in the debug map.<br><br><br></div><div>Hope this helps as a start.<br></div><div><br></div><div>Cheers,<br></div><div>Daniel J H<br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 8, 2017 at 3:33 PM, Jäger, Frank (KRZ) <span dir="ltr"><<a href="mailto:F.Jaeger@krz.de" target="_blank">F.Jaeger@krz.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hallo,<br>
I'm a new in this list and new in using osrm.<br>
<br>
My first routing-service is working now and embedded in an gis-application.<br>
My attention is to find the "nearest school" for an address between some alternatives.<br>
<br>
Next step is to fine-tune the foot-profile to a "save-way-to-school-profile".<br>
For example<br>
<br>
+ highway=track;tracktype=grade1 is acceptable. The street has no name but you can walk on without getting dirty shoes.<br>
<br>
- highway=track;tracktype=grade4 is not acceptable for routing 8 year old children to school.<br>
<br>
Is there any example to use "tracktype" as a sub-type auf "track" in the LUA-Profile to exclude this ways from being used?<br>
<br>
<br>
Greetings<br>
<span class="HOEnZb"><font color="#888888">Frank Jäger<br>
</font></span><br>______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">https://lists.openstreetmap.<wbr>org/listinfo/osrm-talk</a><br>
<br></blockquote></div><br></div>