X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/eeb3d5dd0affdd3317ff62177905b5474ad2fd34..e2a9b5fdf736a7e2605910db302c13fb26dfc077:/lib-lua/themes/nominatim/presets.lua diff --git a/lib-lua/themes/nominatim/presets.lua b/lib-lua/themes/nominatim/presets.lua index fbc9aab1..d8aa7534 100644 --- a/lib-lua/themes/nominatim/presets.lua +++ b/lib-lua/themes/nominatim/presets.lua @@ -2,6 +2,20 @@ local module = {} +-- Customized main tag filter functions + +local EXCLUDED_FOOTWAYS = { sidewalk = 1, crossing = 1, link = 1, traffic_aisle } + +local function filter_footways(place) + if place.has_name then + local footway = place.object.tags.footway + if footway == nil or EXCLUDED_FOOTWAYS[footway] ~= 1 then + return place + end + end + return false +end + -- Main tag definition module.MAIN_TAGS = {} @@ -156,7 +170,7 @@ module.MAIN_TAGS_STREETS.default = { service = 'named', cycleway = 'named', path = 'named', - footway = 'named', + footway = filter_footways, steps = 'named', bridleway = 'named', track = 'named',