[pgrouting-users] Problem with query

Hi All,

Can anyone explain the strange results (see below) I’m getting?

~$ apt-show-versions postgresql
postgresql:all/trusty-updates 9.3+154ubuntu1 uptodate

~$ apt-show-versions postgis
postgis:amd64/trusty 2.1.4+dfsg-3~trusty uptodate

~$ apt-show-versions postgresql-9.3-pgrouting
postgresql-9.3-pgrouting:amd64/trusty 2.2.3-release-ppa1~trusty1 uptodate

The first query gives me 4 values and the second has the ‘id2’ value empty.

SELECT
pgr_bdDijkstra(
'SELECT id_base AS id, source, target, cost_len AS cost, rcost_len AS reverse_cost FROM _rt_geom_streets_base',
11, 6, TRUE, TRUE
);
pgr_bddijkstra
---------------------------------
(0,11,2087858,482.722955703)
(1,3549,2082803,275.837140233)
(2,24976,2086339,272.953707069)
(3,20623,2086101,484.096255058)
(4,48115,2085508,388.315542378)
(5,47218,2084557,480.30350456)
(6,8387,2094458,476.8149761)
(7,248,2093906,255.35844989)
(8,1348,2097029,247.294429215)
(9,1536,2090136,339.718631568)
(10,6465,2091005,330.978413622)
(11,3740,2087980,415.137012292)
(12,1504,2095856,375.236169771)
(13,1505,2090458,466.482679764)
(14,1130,2089855,481.831396537)
(15,1116,2089664,470.256648783)
(16,1117,2139494,262.774003918)
(17,2907,2139496,73.1337200735)
(18,765,2131538,172.32970181)
(19,6,-1,0)
(20 rows)

``
SELECT *
FROM
pgr_bdDijkstra(
'SELECT id_base AS id, source, target, cost_len AS cost, rcost_len AS reverse_cost FROM _rt_geom_streets_base',
11, 6, TRUE, TRUE
);
seq | id1 | id2 | cost
-----+-------+-----+---------------
0 | 11 | | 482.722955703
1 | 3549 | | 275.837140233
2 | 24976 | | 272.953707069
3 | 20623 | | 484.096255058
4 | 48115 | | 388.315542378
5 | 47218 | | 480.30350456
6 | 8387 | | 476.8149761
7 | 248 | | 255.35844989
8 | 1348 | | 247.294429215
9 | 1536 | | 339.718631568
10 | 6465 | | 330.978413622
11 | 3740 | | 415.137012292
12 | 1504 | | 375.236169771
13 | 1505 | | 466.482679764
14 | 1130 | | 481.831396537
15 | 1116 | | 470.256648783
16 | 1117 | | 262.774003918
17 | 2907 | | 73.1337200735
18 | 765 | | 172.32970181
19 | 6 | | 0
(20 rows)

···


Worth Lutz

Hello Worth,

Unfortunately pgr_bddijkstra has bugs.

I must tell you the history of pgRouting so that you can understand why:

V2.0 was to gather and reorganize the functions of pgRouting, preparing for a rewrite, to remove bugs, and unify internal code.

V2.x are rewrites of functions, we are gradually rewriting the functions and we are basically starting with the ones that are c++ boost::graph::function based.

pgr_bdDijkstra is not one of them.

If you can this issue to the issue list:
https://github.com/pgRouting/pgrouting/issues

with your data and queries, so that we are able to reproduce,
and when time comes we have a test case when doing the rewrite of that function.

Vicky

···

On Fri, Jul 1, 2016 at 10:08 AM, Worth Lutz <wal3@mindspring.com> wrote:

Hi All,

Can anyone explain the strange results (see below) I’m getting?

~$ apt-show-versions postgresql
postgresql:all/trusty-updates 9.3+154ubuntu1 uptodate

~$ apt-show-versions postgis
postgis:amd64/trusty 2.1.4+dfsg-3~trusty uptodate

~$ apt-show-versions postgresql-9.3-pgrouting
postgresql-9.3-pgrouting:amd64/trusty 2.2.3-release-ppa1~trusty1 uptodate

The first query gives me 4 values and the second has the ‘id2’ value empty.

SELECT
pgr_bdDijkstra(
'SELECT id_base AS id, source, target, cost_len AS cost, rcost_len AS reverse_cost FROM _rt_geom_streets_base',
11, 6, TRUE, TRUE
);
pgr_bddijkstra
---------------------------------
(0,11,2087858,482.722955703)
(1,3549,2082803,275.837140233)
(2,24976,2086339,272.953707069)
(3,20623,2086101,484.096255058)
(4,48115,2085508,388.315542378)
(5,47218,2084557,480.30350456)
(6,8387,2094458,476.8149761)
(7,248,2093906,255.35844989)
(8,1348,2097029,247.294429215)
(9,1536,2090136,339.718631568)
(10,6465,2091005,330.978413622)
(11,3740,2087980,415.137012292)
(12,1504,2095856,375.236169771)
(13,1505,2090458,466.482679764)
(14,1130,2089855,481.831396537)
(15,1116,2089664,470.256648783)
(16,1117,2139494,262.774003918)
(17,2907,2139496,73.1337200735)
(18,765,2131538,172.32970181)
(19,6,-1,0)
(20 rows)

``
SELECT *
FROM
pgr_bdDijkstra(
'SELECT id_base AS id, source, target, cost_len AS cost, rcost_len AS reverse_cost FROM _rt_geom_streets_base',
11, 6, TRUE, TRUE
);
seq | id1 | id2 | cost
-----+-------+-----+---------------
0 | 11 | | 482.722955703
1 | 3549 | | 275.837140233
2 | 24976 | | 272.953707069
3 | 20623 | | 484.096255058
4 | 48115 | | 388.315542378
5 | 47218 | | 480.30350456
6 | 8387 | | 476.8149761
7 | 248 | | 255.35844989
8 | 1348 | | 247.294429215
9 | 1536 | | 339.718631568
10 | 6465 | | 330.978413622
11 | 3740 | | 415.137012292
12 | 1504 | | 375.236169771
13 | 1505 | | 466.482679764
14 | 1130 | | 481.831396537
15 | 1116 | | 470.256648783
16 | 1117 | | 262.774003918
17 | 2907 | | 73.1337200735
18 | 765 | | 172.32970181
19 | 6 | | 0
(20 rows)


Worth Lutz


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

Georepublic UG (haftungsbeschränkt)
Salzmannstraße 44, 
81739 München, Germany

Vicky Vergara
Operations Research

eMail: vicky@[georepublic.de](http://georepublic.de)
Web: [https://georepublic.info](https://georepublic.info)

Tel: +49 (089) 4161 7698-1
Fax: +49 (089) 4161 7698-9

Commercial register: Amtsgericht München, HRB 181428
CEO: Daniel Kastl

What do you get if you do:

SELECT (pgr_bdDijkstra(...)).*

You should probably write this up as an issue.

-Steve

On 7/1/2016 11:08 AM, Worth Lutz wrote:

Hi All,

Can anyone explain the strange results (see below) I'm getting?

~$ apt-show-versions postgresql
postgresql:all/trusty-updates 9.3+154ubuntu1 uptodate

~$ apt-show-versions postgis
postgis:amd64/trusty 2.1.4+dfsg-3~trusty uptodate

~$ apt-show-versions postgresql-9.3-pgrouting
postgresql-9.3-pgrouting:amd64/trusty 2.2.3-release-ppa1~trusty1 uptodate

The first query gives me 4 values and the second has the 'id2' value empty.

SELECT
    pgr_bdDijkstra(
    'SELECT id_base AS id, source, target, cost_len AS cost, rcost_len
AS reverse_cost FROM _rt_geom_streets_base',
    11, 6, TRUE, TRUE
  );
         pgr_bddijkstra
---------------------------------
(0,11,2087858,482.722955703)
(1,3549,2082803,275.837140233)
(2,24976,2086339,272.953707069)
(3,20623,2086101,484.096255058)
(4,48115,2085508,388.315542378)
(5,47218,2084557,480.30350456)
(6,8387,2094458,476.8149761)
(7,248,2093906,255.35844989)
(8,1348,2097029,247.294429215)
(9,1536,2090136,339.718631568)
(10,6465,2091005,330.978413622)
(11,3740,2087980,415.137012292)
(12,1504,2095856,375.236169771)
(13,1505,2090458,466.482679764)
(14,1130,2089855,481.831396537)
(15,1116,2089664,470.256648783)
(16,1117,2139494,262.774003918)
(17,2907,2139496,73.1337200735)
(18,765,2131538,172.32970181)
(19,6,-1,0)
(20 rows)

SELECT *
  FROM

pgr_bdDijkstra(

    'SELECT id_base AS id, source, target, cost_len AS cost, rcost_len
AS reverse_cost FROM _rt_geom_streets_base',
    11, 6, TRUE, TRUE
  );
seq | id1 | id2 | cost
-----+-------+-----+---------------
   0 | 11 | | 482.722955703
   1 | 3549 | | 275.837140233
   2 | 24976 | | 272.953707069
   3 | 20623 | | 484.096255058
   4 | 48115 | | 388.315542378
   5 | 47218 | | 480.30350456
   6 | 8387 | | 476.8149761
   7 | 248 | | 255.35844989
   8 | 1348 | | 247.294429215
   9 | 1536 | | 339.718631568
  10 | 6465 | | 330.978413622
  11 | 3740 | | 415.137012292
  12 | 1504 | | 375.236169771
  13 | 1505 | | 466.482679764
  14 | 1130 | | 481.831396537
  15 | 1116 | | 470.256648783
  16 | 1117 | | 262.774003918
  17 | 2907 | | 73.1337200735
  18 | 765 | | 172.32970181
  19 | 6 | | 0
(20 rows)

--
*Worth Lutz*

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

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Hi Steve,

That method gives the expected results running in psql on the command line.

In pgAdmin, I got the previous results with no values in the id2 column.

I can get the missing id2 with SELECT pgr_bdDijkstra(…) on pgAdmin also.

Confusion reigns here today!

I’ll see if I can get a test case put together.

···

Worth Lutz

On 7/1/2016 11:48 AM, Stephen Woodbridge wrote:

What do you get if you do:

SELECT (pgr_bdDijkstra(…)).*

You should probably write this up as an issue.

-Steve

On 7/1/2016 11:08 AM, Worth Lutz wrote:

Hi All,

Can anyone explain the strange results (see below) I’m getting?

~$ apt-show-versions postgresql
postgresql:all/trusty-updates 9.3+154ubuntu1 uptodate

~$ apt-show-versions postgis
postgis:amd64/trusty 2.1.4+dfsg-3~trusty uptodate

~$ apt-show-versions postgresql-9.3-pgrouting
postgresql-9.3-pgrouting:amd64/trusty 2.2.3-release-ppa1~trusty1 uptodate

The first query gives me 4 values and the second has the ‘id2’ value empty.

SELECT
pgr_bdDijkstra(
‘SELECT id_base AS id, source, target, cost_len AS cost, rcost_len
AS reverse_cost FROM _rt_geom_streets_base’,
11, 6, TRUE, TRUE
);
pgr_bddijkstra

(0,11,2087858,482.722955703)
(1,3549,2082803,275.837140233)
(2,24976,2086339,272.953707069)
(3,20623,2086101,484.096255058)
(4,48115,2085508,388.315542378)
(5,47218,2084557,480.30350456)
(6,8387,2094458,476.8149761)
(7,248,2093906,255.35844989)
(8,1348,2097029,247.294429215)
(9,1536,2090136,339.718631568)
(10,6465,2091005,330.978413622)
(11,3740,2087980,415.137012292)
(12,1504,2095856,375.236169771)
(13,1505,2090458,466.482679764)
(14,1130,2089855,481.831396537)
(15,1116,2089664,470.256648783)
(16,1117,2139494,262.774003918)
(17,2907,2139496,73.1337200735)
(18,765,2131538,172.32970181)
(19,6,-1,0)
(20 rows)

SELECT *
FROM

pgr_bdDijkstra(

‘SELECT id_base AS id, source, target, cost_len AS cost, rcost_len
AS reverse_cost FROM _rt_geom_streets_base’,
11, 6, TRUE, TRUE
);
seq | id1 | id2 | cost
-----±------±----±--------------
0 | 11 | | 482.722955703
1 | 3549 | | 275.837140233
2 | 24976 | | 272.953707069
3 | 20623 | | 484.096255058
4 | 48115 | | 388.315542378
5 | 47218 | | 480.30350456
6 | 8387 | | 476.8149761
7 | 248 | | 255.35844989
8 | 1348 | | 247.294429215
9 | 1536 | | 339.718631568
10 | 6465 | | 330.978413622
11 | 3740 | | 415.137012292
12 | 1504 | | 375.236169771
13 | 1505 | | 466.482679764
14 | 1130 | | 481.831396537
15 | 1116 | | 470.256648783
16 | 1117 | | 262.774003918
17 | 2907 | | 73.1337200735
18 | 765 | | 172.32970181
19 | 6 | | 0
(20 rows)


Worth Lutz


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


This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


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

Hi Vicky,

How can I tell which ones to use?

I’ve got v2.2.3 of pgRouting.

···

Worth Lutz

On 7/1/2016 11:45 AM, Vicky Vergara wrote:

Hello Worth,

Unfortunately pgr_bddijkstra has bugs.

I must tell you the history of pgRouting so that you can understand why:

V2.0 was to gather and reorganize the functions of pgRouting, preparing for a rewrite, to remove bugs, and unify internal code.

V2.x are rewrites of functions, we are gradually rewriting the functions and we are basically starting with the ones that are c++ boost::graph::function based.

pgr_bdDijkstra is not one of them.

If you can this issue to the issue list:
https://github.com/pgRouting/pgrouting/issues

with your data and queries, so that we are able to reproduce,
and when time comes we have a test case when doing the rewrite of that function.

Vicky

On Fri, Jul 1, 2016 at 10:08 AM, Worth Lutz <wal3@mindspring.com> wrote:

Hi All,

Can anyone explain the strange results (see below) I’m getting?

~$ apt-show-versions postgresql
postgresql:all/trusty-updates 9.3+154ubuntu1 uptodate

~$ apt-show-versions postgis
postgis:amd64/trusty 2.1.4+dfsg-3~trusty uptodate

~$ apt-show-versions postgresql-9.3-pgrouting
postgresql-9.3-pgrouting:amd64/trusty 2.2.3-release-ppa1~trusty1 uptodate

The first query gives me 4 values and the second has the ‘id2’ value empty.

SELECT
pgr_bdDijkstra(
'SELECT id_base AS id, source, target, cost_len AS cost, rcost_len AS reverse_cost FROM _rt_geom_streets_base',
11, 6, TRUE, TRUE
);
pgr_bddijkstra
---------------------------------
(0,11,2087858,482.722955703)
(1,3549,2082803,275.837140233)
(2,24976,2086339,272.953707069)
(3,20623,2086101,484.096255058)
(4,48115,2085508,388.315542378)
(5,47218,2084557,480.30350456)
(6,8387,2094458,476.8149761)
(7,248,2093906,255.35844989)
(8,1348,2097029,247.294429215)
(9,1536,2090136,339.718631568)
(10,6465,2091005,330.978413622)
(11,3740,2087980,415.137012292)
(12,1504,2095856,375.236169771)
(13,1505,2090458,466.482679764)
(14,1130,2089855,481.831396537)
(15,1116,2089664,470.256648783)
(16,1117,2139494,262.774003918)
(17,2907,2139496,73.1337200735)
(18,765,2131538,172.32970181)
(19,6,-1,0)
(20 rows)

``
SELECT *
FROM
pgr_bdDijkstra(
'SELECT id_base AS id, source, target, cost_len AS cost, rcost_len AS reverse_cost FROM _rt_geom_streets_base',
11, 6, TRUE, TRUE
);
seq | id1 | id2 | cost
-----+-------+-----+---------------
0 | 11 | | 482.722955703
1 | 3549 | | 275.837140233
2 | 24976 | | 272.953707069
3 | 20623 | | 484.096255058
4 | 48115 | | 388.315542378
5 | 47218 | | 480.30350456
6 | 8387 | | 476.8149761
7 | 248 | | 255.35844989
8 | 1348 | | 247.294429215
9 | 1536 | | 339.718631568
10 | 6465 | | 330.978413622
11 | 3740 | | 415.137012292
12 | 1504 | | 375.236169771
13 | 1505 | | 466.482679764
14 | 1130 | | 481.831396537
15 | 1116 | | 470.256648783
16 | 1117 | | 262.774003918
17 | 2907 | | 73.1337200735
18 | 765 | | 172.32970181
19 | 6 | | 0
(20 rows)


Worth Lutz


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

Georepublic UG (haftungsbeschränkt)
Salzmannstraße 44, 
81739 München, Germany

Vicky Vergara
Operations Research

eMail: vicky@[georepublic.de](http://georepublic.de)
Web: [https://georepublic.info](https://georepublic.info)

Tel: +49 (089) 4161 7698-1
Fax: +49 (089) 4161 7698-9

Commercial register: Amtsgericht München, HRB 181428
CEO: Daniel Kastl

_______________________________________________
Pgrouting-users mailing list
[Pgrouting-users@lists.osgeo.org](mailto:Pgrouting-users@lists.osgeo.org)
[http://lists.osgeo.org/mailman/listinfo/pgrouting-users](http://lists.osgeo.org/mailman/listinfo/pgrouting-users)

Worh:
latest version is always best, so v2.2.3.

thanks

Vicky

···

On Fri, Jul 1, 2016 at 11:11 AM, Worth Lutz <wal3@mindspring.com> wrote:

Hi Vicky,

How can I tell which ones to use?

I’ve got v2.2.3 of pgRouting.

Worth Lutz

On 7/1/2016 11:45 AM, Vicky Vergara wrote:

Hello Worth,

Unfortunately pgr_bddijkstra has bugs.

I must tell you the history of pgRouting so that you can understand why:

V2.0 was to gather and reorganize the functions of pgRouting, preparing for a rewrite, to remove bugs, and unify internal code.

V2.x are rewrites of functions, we are gradually rewriting the functions and we are basically starting with the ones that are c++ boost::graph::function based.

pgr_bdDijkstra is not one of them.

If you can this issue to the issue list:
https://github.com/pgRouting/pgrouting/issues

with your data and queries, so that we are able to reproduce,
and when time comes we have a test case when doing the rewrite of that function.

Vicky

_______________________________________________
Pgrouting-users mailing list
[Pgrouting-users@lists.osgeo.org](mailto:Pgrouting-users@lists.osgeo.org)
[http://lists.osgeo.org/mailman/listinfo/pgrouting-users](http://lists.osgeo.org/mailman/listinfo/pgrouting-users)

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

On Fri, Jul 1, 2016 at 10:08 AM, Worth Lutz <wal3@mindspring.com> wrote:

Hi All,

Can anyone explain the strange results (see below) I’m getting?

~$ apt-show-versions postgresql
postgresql:all/trusty-updates 9.3+154ubuntu1 uptodate

~$ apt-show-versions postgis
postgis:amd64/trusty 2.1.4+dfsg-3~trusty uptodate

~$ apt-show-versions postgresql-9.3-pgrouting
postgresql-9.3-pgrouting:amd64/trusty 2.2.3-release-ppa1~trusty1 uptodate

The first query gives me 4 values and the second has the ‘id2’ value empty.

SELECT
pgr_bdDijkstra(
'SELECT id_base AS id, source, target, cost_len AS cost, rcost_len AS reverse_cost FROM _rt_geom_streets_base',
11, 6, TRUE, TRUE
);
pgr_bddijkstra
---------------------------------
(0,11,2087858,482.722955703)
(1,3549,2082803,275.837140233)
(2,24976,2086339,272.953707069)
(3,20623,2086101,484.096255058)
(4,48115,2085508,388.315542378)
(5,47218,2084557,480.30350456)
(6,8387,2094458,476.8149761)
(7,248,2093906,255.35844989)
(8,1348,2097029,247.294429215)
(9,1536,2090136,339.718631568)
(10,6465,2091005,330.978413622)
(11,3740,2087980,415.137012292)
(12,1504,2095856,375.236169771)
(13,1505,2090458,466.482679764)
(14,1130,2089855,481.831396537)
(15,1116,2089664,470.256648783)
(16,1117,2139494,262.774003918)
(17,2907,2139496,73.1337200735)
(18,765,2131538,172.32970181)
(19,6,-1,0)
(20 rows)

``
SELECT *
FROM
pgr_bdDijkstra(
'SELECT id_base AS id, source, target, cost_len AS cost, rcost_len AS reverse_cost FROM _rt_geom_streets_base',
11, 6, TRUE, TRUE
);
seq | id1 | id2 | cost
-----+-------+-----+---------------
0 | 11 | | 482.722955703
1 | 3549 | | 275.837140233
2 | 24976 | | 272.953707069
3 | 20623 | | 484.096255058
4 | 48115 | | 388.315542378
5 | 47218 | | 480.30350456
6 | 8387 | | 476.8149761
7 | 248 | | 255.35844989
8 | 1348 | | 247.294429215
9 | 1536 | | 339.718631568
10 | 6465 | | 330.978413622
11 | 3740 | | 415.137012292
12 | 1504 | | 375.236169771
13 | 1505 | | 466.482679764
14 | 1130 | | 481.831396537
15 | 1116 | | 470.256648783
16 | 1117 | | 262.774003918
17 | 2907 | | 73.1337200735
18 | 765 | | 172.32970181
19 | 6 | | 0
(20 rows)


Worth Lutz


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

Georepublic UG (haftungsbeschränkt)
Salzmannstraße 44, 
81739 München, Germany

Vicky Vergara
Operations Research

eMail: vicky@[georepublic.de](http://georepublic.de)
Web: [https://georepublic.info](https://georepublic.info)

Tel: +49 (089) 4161 7698-1
Fax: +49 (089) 4161 7698-9

Commercial register: Amtsgericht München, HRB 181428
CEO: Daniel Kastl

Georepublic UG (haftungsbeschränkt)
Salzmannstraße 44, 
81739 München, Germany

Vicky Vergara
Operations Research

eMail: vicky@[georepublic.de](http://georepublic.de)
Web: [https://georepublic.info](https://georepublic.info)

Tel: +49 (089) 4161 7698-1
Fax: +49 (089) 4161 7698-9

Commercial register: Amtsgericht München, HRB 181428
CEO: Daniel Kastl

On 7/1/2016 12:07 PM, Worth Lutz wrote:

Hi Steve,

That method gives the expected results running in psql on the command line.

Ahhh! OK, I would go with the results from the commandline. pgAdmin has bugs where is does not always display the results in all columns. I'm guessing that if you click one of the blank cells in id2 and copy and then paste it somewhere you will likely get a result value. Or is you run the query and save the results to a cvs file it will have values.

If this is the case, then this particular issue not a pgRouting bug, but a pgAdmin issue.

-Steve

In pgAdmin, I got the previous results with no values in the id2 column.

I can get the missing id2 with SELECT pgr_bdDijkstra(..) on pgAdmin also.

Confusion reigns here today!

I'll see if I can get a test case put together.

*Worth Lutz*

On 7/1/2016 11:48 AM, Stephen Woodbridge wrote:

What do you get if you do:

SELECT (pgr_bdDijkstra(...)).*

You should probably write this up as an issue.

-Steve

On 7/1/2016 11:08 AM, Worth Lutz wrote:

Hi All,

Can anyone explain the strange results (see below) I'm getting?

~$ apt-show-versions postgresql
postgresql:all/trusty-updates 9.3+154ubuntu1 uptodate

~$ apt-show-versions postgis
postgis:amd64/trusty 2.1.4+dfsg-3~trusty uptodate

~$ apt-show-versions postgresql-9.3-pgrouting
postgresql-9.3-pgrouting:amd64/trusty 2.2.3-release-ppa1~trusty1
uptodate

The first query gives me 4 values and the second has the 'id2' value
empty.

SELECT
    pgr_bdDijkstra(
    'SELECT id_base AS id, source, target, cost_len AS cost, rcost_len
AS reverse_cost FROM _rt_geom_streets_base',
    11, 6, TRUE, TRUE
  );
         pgr_bddijkstra
---------------------------------
(0,11,2087858,482.722955703)
(1,3549,2082803,275.837140233)
(2,24976,2086339,272.953707069)
(3,20623,2086101,484.096255058)
(4,48115,2085508,388.315542378)
(5,47218,2084557,480.30350456)
(6,8387,2094458,476.8149761)
(7,248,2093906,255.35844989)
(8,1348,2097029,247.294429215)
(9,1536,2090136,339.718631568)
(10,6465,2091005,330.978413622)
(11,3740,2087980,415.137012292)
(12,1504,2095856,375.236169771)
(13,1505,2090458,466.482679764)
(14,1130,2089855,481.831396537)
(15,1116,2089664,470.256648783)
(16,1117,2139494,262.774003918)
(17,2907,2139496,73.1337200735)
(18,765,2131538,172.32970181)
(19,6,-1,0)
(20 rows)

SELECT *
  FROM

pgr_bdDijkstra(

    'SELECT id_base AS id, source, target, cost_len AS cost, rcost_len
AS reverse_cost FROM _rt_geom_streets_base',
    11, 6, TRUE, TRUE
  );
seq | id1 | id2 | cost
-----+-------+-----+---------------
   0 | 11 | | 482.722955703
   1 | 3549 | | 275.837140233
   2 | 24976 | | 272.953707069
   3 | 20623 | | 484.096255058
   4 | 48115 | | 388.315542378
   5 | 47218 | | 480.30350456
   6 | 8387 | | 476.8149761
   7 | 248 | | 255.35844989
   8 | 1348 | | 247.294429215
   9 | 1536 | | 339.718631568
  10 | 6465 | | 330.978413622
  11 | 3740 | | 415.137012292
  12 | 1504 | | 375.236169771
  13 | 1505 | | 466.482679764
  14 | 1130 | | 481.831396537
  15 | 1116 | | 470.256648783
  16 | 1117 | | 262.774003918
  17 | 2907 | | 73.1337200735
  18 | 765 | | 172.32970181
  19 | 6 | | 0
(20 rows)

--
*Worth Lutz*

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

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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

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

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Vicky,

I meant which algorithms have been reworked and which may still have problems?

I’m working my way through pgRouting to learn the new v2. Much has changed since I last worked with it and I’m trying to understand the differences in all the options.

···

Worth Lutz

On 7/1/2016 1:15 PM, Vicky Vergara wrote:

Worh:
latest version is always best, so v2.2.3.

thanks

Vicky

On Fri, Jul 1, 2016 at 11:11 AM, Worth Lutz <wal3@mindspring.com> wrote:

Hi Vicky,

How can I tell which ones to use?

I’ve got v2.2.3 of pgRouting.

Worth Lutz

On 7/1/2016 11:45 AM, Vicky Vergara wrote:

Hello Worth,

Unfortunately pgr_bddijkstra has bugs.

I must tell you the history of pgRouting so that you can understand why:

V2.0 was to gather and reorganize the functions of pgRouting, preparing for a rewrite, to remove bugs, and unify internal code.

V2.x are rewrites of functions, we are gradually rewriting the functions and we are basically starting with the ones that are c++ boost::graph::function based.

pgr_bdDijkstra is not one of them.

If you can this issue to the issue list:
https://github.com/pgRouting/pgrouting/issues

with your data and queries, so that we are able to reproduce,
and when time comes we have a test case when doing the rewrite of that function.

Vicky

On Fri, Jul 1, 2016 at 10:08 AM, Worth Lutz <wal3@mindspring.com> wrote:

Hi All,

Can anyone explain the strange results (see below) I’m getting?

~$ apt-show-versions postgresql
postgresql:all/trusty-updates 9.3+154ubuntu1 uptodate

~$ apt-show-versions postgis
postgis:amd64/trusty 2.1.4+dfsg-3~trusty uptodate

~$ apt-show-versions postgresql-9.3-pgrouting
postgresql-9.3-pgrouting:amd64/trusty 2.2.3-release-ppa1~trusty1 uptodate

The first query gives me 4 values and the second has the ‘id2’ value empty.

SELECT
pgr_bdDijkstra(
'SELECT id_base AS id, source, target, cost_len AS cost, rcost_len AS reverse_cost FROM _rt_geom_streets_base',
11, 6, TRUE, TRUE
);
pgr_bddijkstra
---------------------------------
(0,11,2087858,482.722955703)
(1,3549,2082803,275.837140233)
(2,24976,2086339,272.953707069)
(3,20623,2086101,484.096255058)
(4,48115,2085508,388.315542378)
(5,47218,2084557,480.30350456)
(6,8387,2094458,476.8149761)
(7,248,2093906,255.35844989)
(8,1348,2097029,247.294429215)
(9,1536,2090136,339.718631568)
(10,6465,2091005,330.978413622)
(11,3740,2087980,415.137012292)
(12,1504,2095856,375.236169771)
(13,1505,2090458,466.482679764)
(14,1130,2089855,481.831396537)
(15,1116,2089664,470.256648783)
(16,1117,2139494,262.774003918)
(17,2907,2139496,73.1337200735)
(18,765,2131538,172.32970181)
(19,6,-1,0)
(20 rows)

``
SELECT *
FROM
pgr_bdDijkstra(
'SELECT id_base AS id, source, target, cost_len AS cost, rcost_len AS reverse_cost FROM _rt_geom_streets_base',
11, 6, TRUE, TRUE
);
seq | id1 | id2 | cost
-----+-------+-----+---------------
0 | 11 | | 482.722955703
1 | 3549 | | 275.837140233
2 | 24976 | | 272.953707069
3 | 20623 | | 484.096255058
4 | 48115 | | 388.315542378
5 | 47218 | | 480.30350456
6 | 8387 | | 476.8149761
7 | 248 | | 255.35844989
8 | 1348 | | 247.294429215
9 | 1536 | | 339.718631568
10 | 6465 | | 330.978413622
11 | 3740 | | 415.137012292
12 | 1504 | | 375.236169771
13 | 1505 | | 466.482679764
14 | 1130 | | 481.831396537
15 | 1116 | | 470.256648783
16 | 1117 | | 262.774003918
17 | 2907 | | 73.1337200735
18 | 765 | | 172.32970181
19 | 6 | | 0
(20 rows)


Worth Lutz


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

Georepublic UG (haftungsbeschränkt)
Salzmannstraße 44, 
81739 München, Germany

Vicky Vergara
Operations Research

eMail: vicky@[georepublic.de](http://georepublic.de)
Web: [https://georepublic.info](https://georepublic.info)

Tel: +49 (089) 4161 7698-1
Fax: +49 (089) 4161 7698-9

Commercial register: Amtsgericht München, HRB 181428
CEO: Daniel Kastl

_______________________________________________
Pgrouting-users mailing list
[Pgrouting-users@lists.osgeo.org](mailto:Pgrouting-users@lists.osgeo.org)
[http://lists.osgeo.org/mailman/listinfo/pgrouting-users](http://lists.osgeo.org/mailman/listinfo/pgrouting-users)

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

Georepublic UG (haftungsbeschränkt)
Salzmannstraße 44, 
81739 München, Germany

Vicky Vergara
Operations Research

eMail: vicky@[georepublic.de](http://georepublic.de)
Web: [https://georepublic.info](https://georepublic.info)

Tel: +49 (089) 4161 7698-1
Fax: +49 (089) 4161 7698-9

Commercial register: Amtsgericht München, HRB 181428
CEO: Daniel Kastl

_______________________________________________
Pgrouting-users mailing list
[Pgrouting-users@lists.osgeo.org](mailto:Pgrouting-users@lists.osgeo.org)
[http://lists.osgeo.org/mailman/listinfo/pgrouting-users](http://lists.osgeo.org/mailman/listinfo/pgrouting-users)

On 7/1/2016 1:29 PM, Stephen Woodbridge wrote:

On 7/1/2016 12:07 PM, Worth Lutz wrote:

Hi Steve,

That method gives the expected results running in psql on the command line.

Ahhh! OK, I would go with the results from the commandline. pgAdmin has bugs where is does not always display the results in all columns.

This is good to know. I will keep this in mind. I need to work in a methodical way to determine what is what. I've been trying this and that and confused myself now.

I'll set up a test case and see if I can display the problem in a repeatable manner.

I'm guessing that if you click one of the blank cells in id2 and copy and then paste it somewhere you will likely get a result value. Or is you run the query and save the results to a cvs file it will have values.

If this is the case, then this particular issue not a pgRouting bug, but a pgAdmin issue.

-Steve

In pgAdmin, I got the previous results with no values in the id2 column.

I can get the missing id2 with SELECT pgr_bdDijkstra(..) on pgAdmin also.

Confusion reigns here today!

I'll see if I can get a test case put together.

*Worth Lutz*

On 7/1/2016 11:48 AM, Stephen Woodbridge wrote:

What do you get if you do:

SELECT (pgr_bdDijkstra(...)).*

You should probably write this up as an issue.

-Steve

On 7/1/2016 11:08 AM, Worth Lutz wrote:

Hi All,

Can anyone explain the strange results (see below) I'm getting?

~$ apt-show-versions postgresql
postgresql:all/trusty-updates 9.3+154ubuntu1 uptodate

~$ apt-show-versions postgis
postgis:amd64/trusty 2.1.4+dfsg-3~trusty uptodate

~$ apt-show-versions postgresql-9.3-pgrouting
postgresql-9.3-pgrouting:amd64/trusty 2.2.3-release-ppa1~trusty1
uptodate

The first query gives me 4 values and the second has the 'id2' value
empty.

SELECT
    pgr_bdDijkstra(
    'SELECT id_base AS id, source, target, cost_len AS cost, rcost_len
AS reverse_cost FROM _rt_geom_streets_base',
    11, 6, TRUE, TRUE
  );
         pgr_bddijkstra
---------------------------------
(0,11,2087858,482.722955703)
(1,3549,2082803,275.837140233)
(2,24976,2086339,272.953707069)
(3,20623,2086101,484.096255058)
(4,48115,2085508,388.315542378)
(5,47218,2084557,480.30350456)
(6,8387,2094458,476.8149761)
(7,248,2093906,255.35844989)
(8,1348,2097029,247.294429215)
(9,1536,2090136,339.718631568)
(10,6465,2091005,330.978413622)
(11,3740,2087980,415.137012292)
(12,1504,2095856,375.236169771)
(13,1505,2090458,466.482679764)
(14,1130,2089855,481.831396537)
(15,1116,2089664,470.256648783)
(16,1117,2139494,262.774003918)
(17,2907,2139496,73.1337200735)
(18,765,2131538,172.32970181)
(19,6,-1,0)
(20 rows)

SELECT *
  FROM

pgr_bdDijkstra(

    'SELECT id_base AS id, source, target, cost_len AS cost, rcost_len
AS reverse_cost FROM _rt_geom_streets_base',
    11, 6, TRUE, TRUE
  );
seq | id1 | id2 | cost
-----+-------+-----+---------------
   0 | 11 | | 482.722955703
   1 | 3549 | | 275.837140233
   2 | 24976 | | 272.953707069
   3 | 20623 | | 484.096255058
   4 | 48115 | | 388.315542378
   5 | 47218 | | 480.30350456
   6 | 8387 | | 476.8149761
   7 | 248 | | 255.35844989
   8 | 1348 | | 247.294429215
   9 | 1536 | | 339.718631568
  10 | 6465 | | 330.978413622
  11 | 3740 | | 415.137012292
  12 | 1504 | | 375.236169771
  13 | 1505 | | 466.482679764
  14 | 1130 | | 481.831396537
  15 | 1116 | | 470.256648783
  16 | 1117 | | 262.774003918
  17 | 2907 | | 73.1337200735
  18 | 765 | | 172.32970181
  19 | 6 | | 0
(20 rows)

--
*Worth Lutz*

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

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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

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

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

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