oubli des ways et relations
This commit is contained in:
parent
f046e29a52
commit
1d04f08264
@ -273,8 +273,13 @@ class Utils:
|
|||||||
# affectation des addresses
|
# affectation des addresses
|
||||||
for element in data["elements"]:
|
for element in data["elements"]:
|
||||||
for row in csv.DictReader(response.text.splitlines()):
|
for row in csv.DictReader(response.text.splitlines()):
|
||||||
lat_ok = row["lat"] == str(element["lat"])
|
if element["type"] == "node":
|
||||||
lon_ok = row["lon"] == str(element["lon"])
|
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:
|
if lat_ok and lon_ok:
|
||||||
element["tags"]["api_adresse:geometry:coordinates:lon"] = row[
|
element["tags"]["api_adresse:geometry:coordinates:lon"] = row[
|
||||||
"result_longitude"
|
"result_longitude"
|
||||||
|
Loading…
Reference in New Issue
Block a user