Make skip_tags global.

This commit is contained in:
Edward Betts 2021-11-12 12:17:59 +00:00
parent 66f214a51b
commit 734dd4025c

View file

@ -26,6 +26,17 @@ tag_prefixes = {
"historic",
}
# these tags are too generic, so we ignore them
skip_tags = {
"Key:addr",
"Key:addr:street",
"Key:lit",
"Key:image",
"Key:name",
"Key:symbol",
"Key:brand",
}
def get_country_iso3166_1(lat, lon):
point = func.ST_SetSRID(func.ST_MakePoint(lon, lat), srid)
alpha2_codes = set()
@ -254,17 +265,6 @@ def get_items(item_ids):
def get_item_tags(item):
skip_tags = {
"Key:addr",
"Key:addr:street",
"Key:lit",
"Key:image",
"Key:name",
"Key:symbol",
"Key:brand",
}
isa_items = []
isa_list = [v["numeric-id"] for v in item.get_isa()]
isa_items = [(isa, []) for isa in get_items(isa_list)]