[pgrouting-users] Wierd results using pgr_kdijkstraPath
AUS - Eyad
b00038807 at aus.edu
Thu Dec 18 07:02:02 PST 2014
Here is a prt_sc after trying pgr_dijkstra as follows:
SELECT seq, id1 as path, (b.geom) as geom, cost FROM pgr_dijkstra(
'SELECT id, source, target, (st_length(geom) * 0.001) as cost FROM schema.network_noded',
336, (SELECT MAX(id) FROM schema.l1_pv1), false, false
) a, schema.network_noded b
WHERE a.id1=b.id
As you may see, there is only too little parts of the network’s lines left (on the sides of the layout)! No route is visible
Hope this clarifies..
Eyad
From: AUS - Eyad [mailto:b00038807 at aus.edu]
Sent: Thursday, December 18, 2014 6:29 PM
To: 'pgRouting users mailing list'
Subject: RE: [pgrouting-users] Wierd results using pgr_kdijkstraPath
Hi Daniel,
Enclosed are 3 maps (1st prt_sc with the original network, 2nd & 3rd prt_sc with the resulted network)
Clearly, the majority of the network has faded away
Awaiting your feedback, I would work on 2nd suggestion
Regards,
Eyad
From: pgrouting-users-bounces at lists.osgeo.org [mailto:pgrouting-users-bounces at lists.osgeo.org] On Behalf Of Daniel Kastl
Sent: Thursday, December 18, 2014 6:28 AM
To: pgRouting users mailing list
Subject: Re: [pgrouting-users] Wierd results using pgr_kdijkstraPath
Hi Eyad,
It's difficult to give an answer based on your query and problem description only. I guess, that (still) your network topology is not correct. It looks like a data problem.
There are 2 things you could do for now:
(1) Show us some image of your "weird de-attached “little” pieces"
(2) Try a simple shortest path query with one start and one end point and see if it works with pgr_dijkstra function for example.
Daniel
On Thu, Dec 18, 2014 at 7:37 AM, AUS - Eyad <b00038807 at aus.edu> wrote:
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
_______________________________________________
Pgrouting-users mailing list
Pgrouting-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users
--
Georepublic UG & Georepublic Japan
eMail: <mailto:daniel.kastl at georepublic.de> daniel.kastl at georepublic.de
Web: <http://georepublic.info> http://georepublic.info
_____
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.5577 / Virus Database: 4253/8755 - Release Date: 12/17/14
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20141218/3179aad3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 65736 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20141218/3179aad3/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 63241 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20141218/3179aad3/attachment-0005.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 62658 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20141218/3179aad3/attachment-0006.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.jpg
Type: image/jpeg
Size: 60950 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20141218/3179aad3/attachment-0007.jpg>
More information about the Pgrouting-users
mailing list