X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/b1e5265d33a2fe1b56034218e1832d35ea4cbdac..ad214753fcdd790916aa1b3b35e679616f4eeb07:/lib-lua/themes/nominatim/presets.lua?ds=sidebyside diff --git a/lib-lua/themes/nominatim/presets.lua b/lib-lua/themes/nominatim/presets.lua index f230433e..4f4fe863 100644 --- a/lib-lua/themes/nominatim/presets.lua +++ b/lib-lua/themes/nominatim/presets.lua @@ -53,6 +53,17 @@ local function exclude_when_key_present(key, named) end end +local function lock_transform(place) + if place.object.tags.waterway ~= nil then + local name = place.object.tags.lock_name + if name ~= nil then + return place:clone{names={name=name, ref=place.object.tags.lock_ref}} + end + end + + return false +end + -- Main tag definition module.MAIN_TAGS = {} @@ -169,6 +180,7 @@ module.MAIN_TAGS_POIS = function (group) leisure = {'always', nature_reserve = 'fallback', no = group}, + lock = {yes = lock_transform}, man_made = {pier = 'always', tower = 'always', bridge = 'always',