[pgrouting-users] pgrouting workshop problem

I am trying so hard for several days to get the shortest path displayed as it is shown in the workshop tutorial. The path does not get displayed from the final-route.html.

I downloaded the latest workshop material from GIT hub and imported that sample data to the “routing” database as mentioned in the workshop.

However I am successful in drawing the topology in Quantum GIS and I can draw a shortest path given a starting node and ending node using QGIS software.

The problem is with the web service. The map of Denver is rendered to the page and combo box is also displayed correctly. But when I give a starting point and ending point, the path simply does not get displayed.

I am exhausted in finding some proper tutorials and I am completely new to this.

Please help me out. Please tell me whether this workshop tutorial is error free or not.


හිෂාන් මෙලංග | Hishan Melanga

According to the web page http://docs.pgrouting.org/dev/src/tsp/doc/index.html

The first parmeter 'start' in the distance matrix version, is the starting node, so in the following examples, I assume that the first entry in the results set would be the same as the 'start' parmeter. It 'works' fine in Example1 and Example2, but Example3 and Example4 start off from node 1 and 0, I was assuming that they would be starting off from node 2 and 3.

Is there any reason for this?
Dave.

Example1
tsp=# SELECT seq, id FROM pgr_tsp('{{0,1,3,3},{1,0,2,2},{3,2,0,2},{3,2,2,0}}',0);
  seq | id
-----+----
    0 | 0
    1 | 1
    2 | 3
    3 | 2
(4 rows)
Example2
tsp=# SELECT seq, id FROM pgr_tsp('{{0,1,3,3},{1,0,2,2},{3,2,0,2},{3,2,2,0}}',1);
  seq | id
-----+----
    0 | 1
    1 | 3
    2 | 2
    3 | 0
(4 rows)
Example3
tsp=# SELECT seq, id FROM pgr_tsp('{{0,1,3,3},{1,0,2,2},{3,2,0,2},{3,2,2,0}}',2);
  seq | id
-----+----
    0 | 1
    1 | 3
    2 | 2
    3 | 0
(4 rows)
Example4
tsp=# SELECT seq, id FROM pgr_tsp('{{0,1,3,3},{1,0,2,2},{3,2,0,2},{3,2,2,0}}',3);
  seq | id
-----+----
    0 | 0
    1 | 1
    2 | 3
    3 | 2
(4 rows)

On 6/25/2013 6:55 AM, Dave Potts wrote:

According to the web page
http://docs.pgrouting.org/dev/src/tsp/doc/index.html

The first parmeter 'start' in the distance matrix version, is the
starting node, so in the following examples, I assume that the first
entry in the results set would be the same as the 'start' parmeter. It
'works' fine in Example1 and Example2, but Example3 and Example4 start
off from node 1 and 0, I was assuming that they would be starting off
from node 2 and 3.

Is there any reason for this?

It might be a bug. I will look at it closer as soon as I get a chance. I have to do some reordering of the list to deal with start and end vertices and might have messed something up doing that. Can you stick this in a bug ticket for me.

Thanks,
   -Steve

Dave.

Example1
tsp=# SELECT seq, id FROM
pgr_tsp('{{0,1,3,3},{1,0,2,2},{3,2,0,2},{3,2,2,0}}',0);
  seq | id
-----+----
    0 | 0
    1 | 1
    2 | 3
    3 | 2
(4 rows)
Example2
tsp=# SELECT seq, id FROM
pgr_tsp('{{0,1,3,3},{1,0,2,2},{3,2,0,2},{3,2,2,0}}',1);
  seq | id
-----+----
    0 | 1
    1 | 3
    2 | 2
    3 | 0
(4 rows)
Example3
tsp=# SELECT seq, id FROM
pgr_tsp('{{0,1,3,3},{1,0,2,2},{3,2,0,2},{3,2,2,0}}',2);
  seq | id
-----+----
    0 | 1
    1 | 3
    2 | 2
    3 | 0
(4 rows)
Example4
tsp=# SELECT seq, id FROM
pgr_tsp('{{0,1,3,3},{1,0,2,2},{3,2,0,2},{3,2,2,0}}',3);
  seq | id
-----+----
    0 | 0
    1 | 1
    2 | 3
    3 | 2
(4 rows)

_______________________________________________
Pgrouting-users mailing list
Pgrouting-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users