- if data.postcode_fallback ~= nil then
- POSTCODE_FALLBACK = data.postcode_fallback
- data.postcode_fallback = nil
- end
- ADDRESS_TAGS = module.tag_group(data)
-
- for _, lst in pairs(data) do
- if lst ~= nil then
- for _, k in ipairs(lst) do
- local key = process_key(k)
- if key ~= nil then
- module.TAGINFO_ADDRESS_KEYS[key] = true
- end
- end
+ ADDRESS_TAGS = {}
+ module.modify_address_tags(data)
+end
+
+
+function module.modify_address_tags(data)
+ for k, v in pairs(data) do
+ if k == 'postcode_fallback' then
+ POSTCODE_FALLBACK = v
+ elseif next(v) == nil then
+ ADDRESS_TAGS[k] = nil
+ else
+ ADDRESS_TAGS[k] = v