I am able to Visualise the Single Route from Source A to Target B by the following code
in QGIS SQL
"id" in (
SELECT id2 as id
FROM pgr_dijkstra(
'SELECT id, source, target, cost FROM ways',
12746, 12714, false, false
) as a left join ways b on a.id2=b.id)
But when I try to load multiple paths (4 in this case) using K-shortest path, Results are segments are scattered all over in different places and I do not see single proper route.
"id" in (
SELECT id2 as id
FROM pgr_ksp(
'SELECT id, source, target, cost FROM ways',
12746, 12714, 4, false
) a LEFT JOIN ways b ON (a.id2 = b.id)
I am very beginner to pgrouting, so help me if i am doing something wrong here?