travail sur name_fr et name_br dans la couche de sortie

This commit is contained in:
MaelReboux 2019-05-01 13:07:43 +02:00
parent b170f99ceb
commit 007b4cf784

View file

@ -107,8 +107,15 @@ ORDER BY pk.id ;" \
b.\"type\",
b.oneway,
b.ref,
b.name_fr,
b.name_br,
CASE
WHEN b.name_fr IS NULL AND b.ref IS NOT NULL THEN b.ref
ELSE b.name_fr
END AS name_fr,
CASE
WHEN b.name_br IS NULL AND b.name_fr IS NULL AND b.ref IS NOT NULL THEN b.ref
WHEN b.name_br IS NULL AND b.name_fr IS NOT NULL THEN '# da dreiñ e brezhoneg #'
ELSE b.name_br
END AS name_br,
b.the_geom
FROM pgr_dijkstra(
'SELECT id, source, target, cost, reverse_cost FROM osm_roads_pgr', $pk_id_start, $pk_id_end) as a