Restored pre-fetching bridge tags

Restored bridge tags but as optional way data; highway or route tags
must be always
This commit is contained in:
yuryleb 2017-02-22 00:13:25 +03:00 committed by Patrick Niklaus
parent 49862d1bcd
commit b59295e55e

View File

@ -298,14 +298,16 @@ function way_function(way, result)
local data = { local data = {
-- prefetch tags -- prefetch tags
highway = way:get_value_by_key('highway'), highway = way:get_value_by_key('highway'),
bridge = way:get_value_by_key('bridge'),
route = way:get_value_by_key('route') route = way:get_value_by_key('route')
} }
-- perform an quick initial check and abort if the way is -- perform an quick initial check and abort if the way is
-- obviously not routable. here we require at least one -- obviously not routable.
-- of the prefetched tags to be present, ie. the data table -- highway or route tags must be in data table, bridge is optional
-- cannot be empty if (not data.highway or data.highway == '') and
if next(data) == nil then -- is the data table empty? (not data.route or data.route == '')
then
return return
end end