reorganisation du test export description

This commit is contained in:
SebF 2022-01-13 22:15:44 +01:00
parent 6ae2729652
commit 7612eb0b7f

View File

@ -124,15 +124,22 @@ class Utils:
# filtrage des tags # filtrage des tags
description = "" description = ""
for tag in overpass_query_fields.keys(): for tag in overpass_query_fields.keys():
if overpass_query_fields[tag]["export_json"] == "Oui": if (
if tag in element["tags"]: overpass_query_fields[tag]["export_json"] == "Oui"
if overpass_query_fields[tag]["FR"] != "": and tag in element["tags"]
description = ( and overpass_query_fields[tag]["FR"] != ""
description + overpass_query_fields[tag]["FR"] + " : " ):
) description = (
description
+ overpass_query_fields[tag]["FR"]
+ " : "
+ str(element["tags"][tag])
+ "\n"
)
description = description + str(element["tags"][tag]) + "\n" export_json["elements"][index_line]["tags"] = {
export_json["elements"][index_line]["tags"] = {"description": description} "description": description[:-1]
}
index_line = index_line + 1 index_line = index_line + 1