mirror of
https://codeberg.org/matkoniecz/list_how_openstreetmap_can_be_improved_with_alltheplaces_data.git
synced 2025-05-13 05:03:09 +02:00
handle name/branch misuse in ATP
This commit is contained in:
parent
0e442a640a
commit
d2e9427dff
2 changed files with 20 additions and 0 deletions
|
@ -176,8 +176,11 @@ def load_atp(filename):
|
|||
if "brand" not in data:
|
||||
rich.print(data)
|
||||
break
|
||||
if "name" in data:
|
||||
data["atp_listing_name"] = data["name"]
|
||||
data["name"] = data["brand"] # Castorama Włocławek is not correct value for name tag...
|
||||
# see https://github.com/alltheplaces/alltheplaces/issues/8658
|
||||
# see https://github.com/alltheplaces/alltheplaces/pull/8739
|
||||
|
||||
deleted_fields = [
|
||||
"@spider", # internal data
|
||||
|
|
|
@ -5,6 +5,7 @@ import rich
|
|||
import csv
|
||||
import shared
|
||||
import nominatim
|
||||
import datetime
|
||||
config = __import__("0_config")
|
||||
|
||||
general_statistics = {} # get rid of global TODO
|
||||
|
@ -118,6 +119,22 @@ def produce_map_analysis(atp_code, nominatim_cache_only):
|
|||
# but it will require extra logic
|
||||
# see say
|
||||
# https://www.openstreetmap.org/way/280274214 https://www.openstreetmap.org/node/4635678378
|
||||
if "atp_listing_name" in atp.atp_tags:
|
||||
if "name" in atp.osm_match_tags:
|
||||
if atp.atp_tags["atp_listing_name"] != atp.osm_match_tags["name"]:
|
||||
if atp_code in [
|
||||
"dino_pl", # https://github.com/alltheplaces/alltheplaces/pull/8782
|
||||
"waffle_house_us", # https://github.com/alltheplaces/alltheplaces/issues/8783
|
||||
]:
|
||||
continue
|
||||
if datetime.datetime.now() > datetime.datetime(2024, 7, 13):
|
||||
# wait for above to be processed to decide how useful it would be to report or fix more
|
||||
print()
|
||||
print("name mismatch between OSM and claimed ATP name")
|
||||
print("https://github.com/alltheplaces/alltheplaces/blob/master/locations/spiders/" + atp_code + ".py")
|
||||
rich.print(atp.atp_tags)
|
||||
rich.print(atp.osm_match_tags)
|
||||
print()
|
||||
tags_to_be_added = []
|
||||
for pulled_tag in importable_tags:
|
||||
if pulled_tag not in atp.atp_tags:
|
||||
|
|
Loading…
Add table
Reference in a new issue