Skip to content

Commit 3258dd9

Browse files
ajout champ transport exceptionnnel (#84)
* ajout champ transport exceptionnnel * Update bdtopo_v3.3.sql * Update changelog.md --------- Co-authored-by: Amaury Zarzelli <amaury.zarzelli@ign.fr>
1 parent 0aff98b commit 3258dd9

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.2.9
4+
ADDED:
5+
- get transport_exceptionnel field of bdtopo in pgr data
6+
37
## 2.2.8
48
FIXED:
59
- wrong import in _lua_builder.py

r2gg/_pivot_to_pgr.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ def pivot_to_pgr(source, cost_calculation_file_path, connection_work, connection
7979
matieres_dangereuses_interdites boolean,
8080
cpx_gestionnaire text,
8181
cpx_numero_route_europeenne text,
82-
cpx_classement_administratif text
82+
cpx_classement_administratif text,
83+
transport_exceptionnel boolean
8384
);""".format(ways_table_name)
8485
logger.debug("SQL: {}".format(create_table))
8586
cursor_out.execute(create_table)
@@ -256,7 +257,8 @@ def pivot_to_pgr(source, cost_calculation_file_path, connection_work, connection
256257
'matieres_dangereuses_interdites as matieres_dangereuses_interdites',
257258
'cpx_gestionnaire as cpx_gestionnaire',
258259
'cpx_numero_route_europeenne as cpx_numero_route_europeenne',
259-
'cpx_classement_administratif as cpx_classement_administratif'
260+
'cpx_classement_administratif as cpx_classement_administratif',
261+
'transport_exceptionnel as transport_exceptionnel'
260262
]
261263
in_columns = attribute_columns.copy()
262264
for variable in costs["variables"]:

sql/bdtopo_v3.3.sql

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ CREATE TABLE IF NOT EXISTS {output_schema}.edges (
8282
matieres_dangereuses_interdites boolean,
8383
cpx_gestionnaire text,
8484
cpx_numero_route_europeenne text,
85-
cpx_classement_administratif text
85+
cpx_classement_administratif text,
86+
transport_exceptionnel boolean
8687
);
8788

8889

@@ -205,6 +206,7 @@ CREATE TEMP TABLE IF NOT EXISTS bduni_troncon AS
205206
t.cpx_gestionnaire as cpx_gestionnaire,
206207
t.cpx_numero_route_europeenne as cpx_numero_route_europeenne,
207208
t.cpx_classement_administratif as cpx_classement_administratif,
209+
t.transport_exceptionnel as transport_exceptionnel,
208210

209211
-- géométrie du troncon
210212
ST_Force2D(ST_Transform(t.geom, 4326)) as geom
@@ -288,7 +290,8 @@ INSERT INTO {output_schema}.edges
288290
matieres_dangereuses_interdites as matieres_dangereuses_interdites,
289291
cpx_gestionnaire as cpx_gestionnaire,
290292
cpx_numero_route_europeenne as cpx_numero_route_europeenne,
291-
cpx_classement_administratif as cpx_classement_administratif
293+
cpx_classement_administratif as cpx_classement_administratif,
294+
transport_exceptionnel as transport_exceptionnel
292295
FROM bduni_troncon
293296
;
294297

0 commit comments

Comments
 (0)