From 665eb12d2beef91b1be66eae8c28669e85ec62f0 Mon Sep 17 00:00:00 2001 From: MaelReboux Date: Sat, 5 Oct 2019 18:23:49 +0200 Subject: [PATCH] gestion sous-secteurs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit = changement de datatype (9a, 9b…) --- scripts/create_tables.sql | 2 +- scripts/traitements_phase_2.1.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/create_tables.sql b/scripts/create_tables.sql index eaab151..d6e62df 100644 --- a/scripts/create_tables.sql +++ b/scripts/create_tables.sql @@ -173,7 +173,7 @@ CREATE VIEW phase_1_tdb AS DROP TABLE IF EXISTS phase_2_pk_secteur CASCADE ; CREATE TABLE phase_2_pk_secteur ( - id integer, + id varchar(10), name text, pgr_node_id integer, secteur_id integer, diff --git a/scripts/traitements_phase_2.1.sql b/scripts/traitements_phase_2.1.sql index 7e4cf86..08d05f7 100644 --- a/scripts/traitements_phase_2.1.sql +++ b/scripts/traitements_phase_2.1.sql @@ -33,7 +33,7 @@ SELECT ST_Distance(pk_org.the_geom, ST_ClosestPoint(node.the_geom, pk_org.the_geom))* 1.01 -- dans la distance de ce plus proche point ) AS the_geom FROM - (SELECT id::integer, name, secteur_id, ST_Transform(the_geom,2154) AS the_geom FROM phase_2_pk_secteur_3857) AS pk_org, + (SELECT id, name, secteur_id, ST_Transform(the_geom,2154) AS the_geom FROM phase_2_pk_secteur_3857) AS pk_org, (SELECT id, the_geom FROM osm_roads_pgr_vertices_pgr) AS node WHERE ST_INTERSECTS(node.the_geom, ST_BUFFER(ST_Transform(pk_org.the_geom,2154) ,25) )