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