From e0f51dd5e9e67f52e32d585f966853ab562554a4 Mon Sep 17 00:00:00 2001 From: DennisOSRM Date: Thu, 30 Aug 2012 18:58:42 +0200 Subject: [PATCH] Fixes issue #366 --- profile.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/profile.lua b/profile.lua index cdc424590..19bb4297a 100644 --- a/profile.lua +++ b/profile.lua @@ -4,6 +4,7 @@ bollards_whitelist = { [""] = true, ["cattle_grid"] = true, ["border_control"] = access_tag_whitelist = { ["yes"] = true, ["motorcar"] = true, ["motor_vehicle"] = true, ["vehicle"] = true, ["permissive"] = true, ["designated"] = true } access_tag_blacklist = { ["no"] = true, ["private"] = true, ["agricultural"] = true, ["forestery"] = true } access_tag_restricted = { ["destination"] = true, ["delivery"] = true } +access_tags = { "motor_vehicle", "vehicle" } service_tag_restricted = { ["parking_aisle"] = true } ignore_in_grid = { ["ferry"] = true, ["pier"] = true } @@ -86,6 +87,16 @@ function way_function (way, numberOfNodesInWay) return 0; end + -- Check if our vehicle types are forbidden + for i,v in ipairs(access_tags) do + local mode_value = way.tags:Find(v) + if nil ~= mode_value and "no" == mode_value then + return 0; + end + end + + + -- Set the name that will be used for instructions if "" ~= ref then way.name = ref elseif "" ~= name then