[OSRM-talk] routing profile tracktype

Daniel Hofmann hofmann at mapbox.com
Wed Mar 8 14:51:19 UTC 2017

Have a look at profiles/lib/handlers.lua - in there you will find handlers
for certain situations, for example here for surfaces


All handlers are getting called in order here


and exit early if a handler returned false


You can either add your own handler discarding ways completely or better
penalize such ways by setting a high weight.
Then the routing engine will always find a way but prefer ways with your
tracktype criteria.

Here's the Lua `result`'s attributes

Make sure to test your profile locally on small extracts and / or in the
debug map.

Hope this helps as a start.

Daniel J H

On Wed, Mar 8, 2017 at 3:33 PM, Jäger, Frank (KRZ) <F.Jaeger at krz.de> wrote:

> Hallo,
> I'm a new in this list and new in using osrm.
> My first routing-service is working now and embedded in an gis-application.
> My attention is to find the "nearest school" for an address between some
> alternatives.
> Next step is to fine-tune the foot-profile to a
> "save-way-to-school-profile".
> For example
> + highway=track;tracktype=grade1 is acceptable. The street has no name but
> you can walk on without getting dirty shoes.
> - highway=track;tracktype=grade4 is not acceptable for routing 8 year old
> children to school.
> Is there any example to use "tracktype" as a sub-type auf "track" in the
> LUA-Profile to exclude this ways from being used?
> Greetings
> Frank Jäger
> _______________________________________________
> 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/20170308/c368675a/attachment.html>

More information about the OSRM-talk mailing list