[pgrouting-users] Wierd results using pgr_kdijkstraPath

AUS - Eyad b00038807 at aus.edu
Wed Dec 17 14:37:19 PST 2014


Hello pgr_Experts,

 

I'm trying to get all the routes from a source point (i.e. 336) to a group
of target/destination points (located at different edges/ends of
linestrings' network) using the below code:

 

SELECT seq, id1 as path, id2 as node, id3 as edge, (b.geom) as geom, cost
FROM pgr_kdijkstraPath(

    'SELECT id, source, target, (st_length(geom) * 0.001) as cost FROM
schema.network_noded',

    336, (SELECT array_agg(id) FROM schema.l1_pv1), false, false

  ) a, schema.network_noded b 

WHERE a.id1=b.id

 

It's resulting a weird de-attached "little" pieces of my original
nodded_network! However, the number of resulted paths is equal to the
target/destination points. Please advise:

 

1)      What potential mistake I may have committed?

2)      Does it mean that all the calculated travel_cost(s) are wrong (as
they are reflected/represented by wrong linestrings)?

 

I'm using QGIS 2.4.0 and pgRouting pg93-binaries-2.4.0

 

I found similar question on this list of pgRouting users, asked by Antonio
last October
(http://lists.osgeo.org/pipermail/pgrouting-users/2014-October/001992.html
), but obviously the question is not answered yet?

 

Regards..

 

Eyad

 

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20141218/7e09ae9a/attachment.html>


More information about the Pgrouting-users mailing list