X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/3683cf7ddc72b57c0990430ca5b03e370b29f8c3..a15c197547b9eac7553b57d12b8ce7200e1b574d:/settings/flex-base.lua diff --git a/settings/flex-base.lua b/settings/flex-base.lua index d9462588..fe3ce32a 100644 --- a/settings/flex-base.lua +++ b/settings/flex-base.lua @@ -331,8 +331,10 @@ function process_tags(o) end -- address keys - o:grab_address{match=function (k, v) return COUNTRY_TAGS(k, v) and #v == 2 end, - out_key='country'} + o:grab_address{match=COUNTRY_TAGS, out_key='country'} + if o.address.country ~= nil and #o.address.country ~= 2 then + o.address['country'] = nil + end if o:grab_name{match=HOUSENAME_TAGS} > 0 then fallback = {'place', 'house'} end @@ -345,16 +347,6 @@ function process_tags(o) local is_interpolation = o:grab_address{match=INTERPOLATION_TAGS} > 0 - if ADD_TIGER_COUNTY then - local v = o:grab_tag('tiger:county') - if v ~= nil then - v, num = v:gsub(',.*', ' county') - if num == 0 then - v = v .. ' county' - end - o:set_address('tiger:county', v) - end - end o:grab_address{match=ADDRESS_TAGS} if is_interpolation then