oubli des ways et relations

This commit is contained in:
SebF 2021-11-01 21:23:30 +01:00
parent f046e29a52
commit 1d04f08264

View File

@ -273,8 +273,13 @@ class Utils:
# affectation des addresses
for element in data["elements"]:
for row in csv.DictReader(response.text.splitlines()):
if element["type"] == "node":
lat_ok = row["lat"] == str(element["lat"])
lon_ok = row["lon"] == str(element["lon"])
else:
lat_ok = row["lat"] == str(element["center"]["lat"])
lon_ok = row["lon"] == str(element["center"]["lon"])
if lat_ok and lon_ok:
element["tags"]["api_adresse:geometry:coordinates:lon"] = row[
"result_longitude"