return early if way is not either highway=* or route=* in car profile. Estimated cost saving 10%

This commit is contained in:
Dennis Luxen 2014-07-24 18:00:37 +02:00
parent bbe440cacd
commit 1508874ebc

View File

@ -112,6 +112,14 @@ function node_function (node)
end end
function way_function (way) function way_function (way)
local is_highway = way.tags:Holds("highway")
local is_route = way.tags:Holds("route")
if not (is_highway or is_route) then
return
end
-- we dont route over areas -- we dont route over areas
local is_area = way.tags:Holds("area") local is_area = way.tags:Holds("area")
if ignore_areas and is_area then if ignore_areas and is_area then