Search code examples
openstreetmaposrm

Is it possible to restrict routes based on traffic_calming tags?


I'm new to OSRM and doing some research. As per the title, is it possible to restrict routing based on traffic_calming tags? For instance, could you add "traffic_calming" somewhere in "profiles/car.lua" or in "features/car/barrier.feature" such that when the routing was done it avoided some/all of roads with traffic calming on them?

Thanks


Solution

  • Yes you can mark traffic_calming as barrier by adding some code here:

    result.barrier = node:get_value_by_key("traffic_calming") == "yes"