From 7d4e4b2da38b02ae55765dbab8481f180ea0d524 Mon Sep 17 00:00:00 2001 From: Olav_2 Date: Sun, 3 Oct 2021 12:29:38 +0200 Subject: [PATCH] =?UTF-8?q?Capacit=C3=A9=20des=20parkings=20v=C3=A9los=20e?= =?UTF-8?q?n=20nombre=20au=20lieu=20de=20texte=20si=20possible?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- recup_donnees_OSM_Overpass.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/recup_donnees_OSM_Overpass.py b/recup_donnees_OSM_Overpass.py index c57f27a..a923696 100644 --- a/recup_donnees_OSM_Overpass.py +++ b/recup_donnees_OSM_Overpass.py @@ -37,7 +37,7 @@ retry_delay = 120 # id Romagnat : 138269 # l'id de l'area se calcule en ajoutant 3600000000 au numéro de l'objet OSM -aire_de_recherche = str(3600000000+7406) +aire_de_recherche = str(3600000000+110866) @@ -464,7 +464,11 @@ def executer_requete_et_exporter_resultats(nom_req, critere, aire_de_recherche, # if (element["type"] == "node") : for field in overpass_query_fields.keys() : if (field in element["tags"]) : - line.append(element["tags"][field]) + if field == "capacity": + val = element["tags"][field] + line.append(int(val) if val.isdigit() else val) + else : + line.append(element["tags"][field]) else : line.append("") index_col = index_col + 1