From fc531fe48d2f49aee435a6ddb7233b6af7abe711 Mon Sep 17 00:00:00 2001 From: MaelREBOUX Date: Thu, 6 Jan 2022 16:52:57 +0100 Subject: [PATCH] Update phase_5.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ogr2ogr n'exporte pas la clé primaire pk_id --- scripts_v2/phase_5.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts_v2/phase_5.py b/scripts_v2/phase_5.py index e262ace..5c98e87 100755 --- a/scripts_v2/phase_5.py +++ b/scripts_v2/phase_5.py @@ -411,7 +411,8 @@ WHERE phase_5_pk.pk_id = pk_recales.pk_id ;""" export_cmd = ["ogr2ogr", "-f", "GeoJSON", f"../data/{millesime}/phase_5_pk.geojson", f"PG:host={db_redadeg_host} port={db_redadeg_port} user={db_redadeg_user} password={db_redadeg_passwd} dbname={db_redadeg_db}", - "phase_5_pk", "-t_srs", "EPSG:4326"] + "-sql", "SELECT * FROM phase_5_pk ORDER BY pk_id ;", + "-t_srs", "EPSG:4326"] # on exporte subprocess.check_output(export_cmd) print(" fait")