mirror of
https://codeberg.org/matkoniecz/list_how_openstreetmap_can_be_improved_with_alltheplaces_data.git
synced 2025-05-12 20:53:08 +02:00
remove mismatch root cause
This commit is contained in:
parent
b447d1b501
commit
7362c1aff8
2 changed files with 4 additions and 2 deletions
|
@ -19,11 +19,13 @@ def filter_osm_data_with_dict(current_osm, osm_data_tag_filter):
|
|||
returned.append(osm)
|
||||
return returned
|
||||
|
||||
def name_giving_keys():
|
||||
return ["name", "short_name", "brand", "brand:en"]
|
||||
|
||||
def is_matching_any_name_part_to_osm_tags(name_part_list, osm_tags):
|
||||
# if changing anything here, please also change this_tag_lists_match debug code in tests
|
||||
for part in name_part_list:
|
||||
for key in ["name", "short_name", "brand", "brand:en"]:
|
||||
for key in name_giving_keys():
|
||||
if key in osm_tags:
|
||||
if matching_name_part(part, osm_tags[key]):
|
||||
return True
|
||||
|
|
|
@ -93,7 +93,7 @@ class MatchingTests(unittest.TestCase):
|
|||
# replicates matcher.is_matching_any_name_part_to_osm_tags
|
||||
name_part_list = filter_names
|
||||
for part in name_part_list:
|
||||
for key in ["name", "brand", "brand:en"]:
|
||||
for key in matcher.name_giving_keys():
|
||||
if key in osm_tags:
|
||||
if matcher.matching_name_part(part, osm_tags[key]):
|
||||
print(part, "matches to osm_tags[key] with value", osm_tags[key], "for key", key)
|
||||
|
|
Loading…
Add table
Reference in a new issue