diff --git a/changelog.md b/changelog.md index f71cd2a..c9a1094 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # CHANGELOG +## 2.2.9 +ADDED: +- get transport_exceptionnel field of bdtopo in pgr data + ## 2.2.8 FIXED: - wrong import in _lua_builder.py diff --git a/r2gg/_pivot_to_pgr.py b/r2gg/_pivot_to_pgr.py index 2d0686a..841042c 100644 --- a/r2gg/_pivot_to_pgr.py +++ b/r2gg/_pivot_to_pgr.py @@ -79,7 +79,8 @@ def pivot_to_pgr(source, cost_calculation_file_path, connection_work, connection matieres_dangereuses_interdites boolean, cpx_gestionnaire text, cpx_numero_route_europeenne text, - cpx_classement_administratif text + cpx_classement_administratif text, + transport_exceptionnel boolean );""".format(ways_table_name) logger.debug("SQL: {}".format(create_table)) cursor_out.execute(create_table) @@ -256,7 +257,8 @@ def pivot_to_pgr(source, cost_calculation_file_path, connection_work, connection 'matieres_dangereuses_interdites as matieres_dangereuses_interdites', 'cpx_gestionnaire as cpx_gestionnaire', 'cpx_numero_route_europeenne as cpx_numero_route_europeenne', - 'cpx_classement_administratif as cpx_classement_administratif' + 'cpx_classement_administratif as cpx_classement_administratif', + 'transport_exceptionnel as transport_exceptionnel' ] in_columns = attribute_columns.copy() for variable in costs["variables"]: diff --git a/sql/bdtopo_v3.3.sql b/sql/bdtopo_v3.3.sql index 8e4dd0e..60fe9c5 100644 --- a/sql/bdtopo_v3.3.sql +++ b/sql/bdtopo_v3.3.sql @@ -82,7 +82,8 @@ CREATE TABLE IF NOT EXISTS {output_schema}.edges ( matieres_dangereuses_interdites boolean, cpx_gestionnaire text, cpx_numero_route_europeenne text, - cpx_classement_administratif text + cpx_classement_administratif text, + transport_exceptionnel boolean ); @@ -205,6 +206,7 @@ CREATE TEMP TABLE IF NOT EXISTS bduni_troncon AS t.cpx_gestionnaire as cpx_gestionnaire, t.cpx_numero_route_europeenne as cpx_numero_route_europeenne, t.cpx_classement_administratif as cpx_classement_administratif, + t.transport_exceptionnel as transport_exceptionnel, -- géométrie du troncon ST_Force2D(ST_Transform(t.geom, 4326)) as geom @@ -288,7 +290,8 @@ INSERT INTO {output_schema}.edges matieres_dangereuses_interdites as matieres_dangereuses_interdites, cpx_gestionnaire as cpx_gestionnaire, cpx_numero_route_europeenne as cpx_numero_route_europeenne, - cpx_classement_administratif as cpx_classement_administratif + cpx_classement_administratif as cpx_classement_administratif, + transport_exceptionnel as transport_exceptionnel FROM bduni_troncon ;