From b59295e55edb9ad03ea3a714b7d1f67c59bc8584 Mon Sep 17 00:00:00 2001 From: yuryleb Date: Wed, 22 Feb 2017 00:13:25 +0300 Subject: [PATCH] Restored pre-fetching bridge tags Restored bridge tags but as optional way data; highway or route tags must be always --- profiles/car.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/profiles/car.lua b/profiles/car.lua index 5c181110e..07c85dc9d 100644 --- a/profiles/car.lua +++ b/profiles/car.lua @@ -298,14 +298,16 @@ function way_function(way, result) local data = { -- prefetch tags highway = way:get_value_by_key('highway'), + bridge = way:get_value_by_key('bridge'), route = way:get_value_by_key('route') } -- perform an quick initial check and abort if the way is - -- obviously not routable. here we require at least one - -- of the prefetched tags to be present, ie. the data table - -- cannot be empty - if next(data) == nil then -- is the data table empty? + -- obviously not routable. + -- highway or route tags must be in data table, bridge is optional + if (not data.highway or data.highway == '') and + (not data.route or data.route == '') + then return end