one query better than two

This commit is contained in:
MaelReboux 2019-05-09 15:39:09 +02:00
parent b6fc402951
commit 0de85afe4e
2 changed files with 2 additions and 4 deletions

View file

@ -73,8 +73,7 @@ WHERE e.edge_id = rel.element_id
);
-- calcul des 2 attributs de coût (= longueur)
UPDATE osm_roads_pgr SET cost = st_length(the_geom);
UPDATE osm_roads_pgr SET reverse_cost = st_length(the_geom);
UPDATE osm_roads_pgr SET cost = st_length(the_geom), reverse_cost = st_length(the_geom);
-- 5. calcul du graphe routier par pgRouting

View file

@ -42,8 +42,7 @@ WHERE e.edge_id = rel.element_id
);
-- calcul des 2 attributs de coût (= longueur)
UPDATE osm_roads_pgr SET cost = st_length(the_geom);
UPDATE osm_roads_pgr SET reverse_cost = st_length(the_geom);
UPDATE osm_roads_pgr SET cost = st_length(the_geom), reverse_cost = st_length(the_geom);
-- calcul du graphe routier par pgRouting