vidage de TOUTES les tables de routage
This commit is contained in:
parent
b491468c5a
commit
31bc6f69c3
|
@ -18,7 +18,12 @@ UPDATE osm_roads SET topo_geom = topology.toTopoGeom(the_geom, 'osm_roads_topo',
|
||||||
|
|
||||||
-- maj de la couche support des calculs d'itinéraire
|
-- maj de la couche support des calculs d'itinéraire
|
||||||
-- 30 s
|
-- 30 s
|
||||||
|
-- on commence par vider les couches existantes
|
||||||
TRUNCATE TABLE osm_roads_pgr ;
|
TRUNCATE TABLE osm_roads_pgr ;
|
||||||
|
TRUNCATE TABLE osm_roads_pgr_noded ;
|
||||||
|
TRUNCATE TABLE osm_roads_pgr_vertices_pgr ;
|
||||||
|
|
||||||
|
-- on remplit la couche de lignes
|
||||||
INSERT INTO osm_roads_pgr
|
INSERT INTO osm_roads_pgr
|
||||||
( SELECT
|
( SELECT
|
||||||
row_number() over() as id,
|
row_number() over() as id,
|
||||||
|
@ -47,6 +52,7 @@ UPDATE osm_roads_pgr SET reverse_cost = st_length(the_geom);
|
||||||
|
|
||||||
|
|
||||||
-- calcul du graphe routier par pgRouting
|
-- calcul du graphe routier par pgRouting
|
||||||
|
-- cela va remplir les tables osm_roads_pgr_noded et osm_roads_pgr_vertices_pgr
|
||||||
-- 30 s
|
-- 30 s
|
||||||
SELECT pgr_createTopology('osm_roads_pgr', 1.0);
|
SELECT pgr_createTopology('osm_roads_pgr', 1.0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue