I am trying to find out shortest path to many target in single query.
I have write the below code, but its not getting the result.... please give a solution for this.
create table test1 as
SELECT pt.gid,
seq,id1 AS note,
id2 AS edge,
pt.cost,
pt.reverse_cost ,
pt.the_geom
FROM pgr_kdijkstraPath(
'SELECT
gid AS id,
source,
target,
st_length(the_geom) AS cost,
reverse_cost,
x1,y1,x2,y2
FROM
road_network',
26,
array[1055,2013], true, true) as di
JOIN road_network pt ON di.id2 = pt.gid;