Have a look at profiles/lib/handlers.lua - in there you will find handlers
for certain situations, for example here for surfaces
https://github.com/Project-OSRM/osrm-backend/blob/5.6/profiles/lib/handlers.lua#L275-L293
All handlers are getting called in order here
https://github.com/Project-OSRM/osrm-backend/blob/master/profiles/foot.lua#L200-L240
and exit early if a handler returned false
https://github.com/Project-OSRM/osrm-backend/blob/5.6/profiles/lib/handlers.lua#L505-L511
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
https://github.com/Project-OSRM/osrm-backend/blob/master/src/extractor/scripting_environment_lua.cpp#L309-L350
Make sure to test your profile locally on small extracts and / or in the
debug map.
Hope this helps as a start.
Cheers,
Daniel J H
On Wed, Mar 8, 2017 at 3:33 PM, Jäger, Frank (KRZ) 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@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/osrm-talk
>
>
___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk