[pgrouting-users] pgrouting installation

Dear All,

I am trying to setup and test pgrouting, I followed the setups but it is still not working. If ollowed the following steps:

1- Copay pgrouting libraries to …\pgsql\8.4\lib

2- Execute routing_core.sql and routing_core_wrappers.sql

3- Create a newtwork:

a. Added source and target fields

b. Execute Execute assign_vertex_id(‘

’, float tolerance, ‘<geometry column’, ‘’)

c. Added indices

d. Added reverse_cost column.

Then I used the following query to retrieve records:

SELECT * FROM shortest_path(‘

SELECT gid as id,

source::integer,

target::integer,

length::double precision as cost

FROM ways’,

24154,

24157,

false, false)

the query executes without errors, but return no data. I checked the table and the records seems OK.

is there a way to validate the database and verify the topology? How to make sure that the pgrouting library (dlls) are installed and working correctly?

Thanks

On Mon, Sep 12, 2011 at 11:20 AM, Ali Taha <ali.taha@ritaj.ps> wrote:

Dear All,

I am trying to setup and test pgrouting, I followed the setups but it is still not working. If ollowed the following steps:

1- Copay pgrouting libraries to …\pgsql\8.4\lib

From where did you copy them?
Did you compile? Which OS?

Daniel

2- Execute routing_core.sql and routing_core_wrappers.sql

3- Create a newtwork:

a. Added source and target fields

b. Execute Execute assign_vertex_id(‘

’, float tolerance, ‘<geometry column’, ‘’)

c. Added indices

d. Added reverse_cost column.

Then I used the following query to retrieve records:

SELECT * FROM shortest_path(‘

SELECT gid as id,

source::integer,

target::integer,

length::double precision as cost

FROM ways’,

24154,

24157,

false, false)

the query executes without errors, but return no data. I checked the table and the records seems OK.

is there a way to validate the database and verify the topology? How to make sure that the pgrouting library (dlls) are installed and working correctly?

Thanks


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


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de

Dear Daniel,

I downloaded them from http://www.pgrouting.org/download.html (windows binaries section pgRouting-1.03_pg-8.4.2)

I have windows 7 OS

Thanks

From: pgrouting-users-bounces@lists.osgeo.org [mailto:pgrouting-users-bounces@lists.osgeo.org] On Behalf Of Daniel Kastl
Sent: Tuesday, September 13, 2011 6:34 AM
To: pgRouting users mailing list
Subject: Re: [pgrouting-users] pgrouting installation

On Mon, Sep 12, 2011 at 11:20 AM, Ali Taha <ali.taha@ritaj.ps> wrote:

Dear All,

I am trying to setup and test pgrouting, I followed the setups but it is still not working. If ollowed the following steps:

1- Copay pgrouting libraries to …\pgsql\8.4\lib

From where did you copy them?

Did you compile? Which OS?

Daniel

2- Execute routing_core.sql and routing_core_wrappers.sql

3- Create a newtwork:

a. Added source and target fields

b. Execute Execute assign_vertex_id(‘

’, float tolerance, ‘<geometry column’, ‘’)

c. Added indices

d. Added reverse_cost column.

Then I used the following query to retrieve records:

SELECT * FROM shortest_path(‘

SELECT gid as id,

source::integer,

target::integer,

length::double precision as cost

FROM ways’,

24154,

24157,

false, false)

the query executes without errors, but return no data. I checked the table and the records seems OK.

is there a way to validate the database and verify the topology? How to make sure that the pgrouting library (dlls) are installed and working correctly?

Thanks


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


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de

Hi Ali,

I may be wrong, and if there are Windows users out there who know it better, please correct me.
But the binaries for pgRouting were not compiled with Windows 7. They might work, but not necessarily.

Daniel

On Tue, Sep 13, 2011 at 2:39 AM, Ali Taha <ali.taha@ritaj.ps> wrote:

Dear Daniel,

I downloaded them from http://www.pgrouting.org/download.html (windows binaries section pgRouting-1.03_pg-8.4.2)

I have windows 7 OS

Thanks

From: pgrouting-users-bounces@lists.osgeo.org [mailto:pgrouting-users-bounces@lists.osgeo.org] On Behalf Of Daniel Kastl
Sent: Tuesday, September 13, 2011 6:34 AM
To: pgRouting users mailing list
Subject: Re: [pgrouting-users] pgrouting installation

On Mon, Sep 12, 2011 at 11:20 AM, Ali Taha <ali.taha@ritaj.ps> wrote:

Dear All,

I am trying to setup and test pgrouting, I followed the setups but it is still not working. If ollowed the following steps:

1- Copay pgrouting libraries to …\pgsql\8.4\lib

From where did you copy them?

Did you compile? Which OS?

Daniel

2- Execute routing_core.sql and routing_core_wrappers.sql

3- Create a newtwork:

a. Added source and target fields

b. Execute Execute assign_vertex_id(‘

’, float tolerance, ‘<geometry column’, ‘’)

c. Added indices

d. Added reverse_cost column.

Then I used the following query to retrieve records:

SELECT * FROM shortest_path(‘

SELECT gid as id,

source::integer,

target::integer,

length::double precision as cost

FROM ways’,

24154,

24157,

false, false)

the query executes without errors, but return no data. I checked the table and the records seems OK.

is there a way to validate the database and verify the topology? How to make sure that the pgrouting library (dlls) are installed and working correctly?

Thanks


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


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de


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


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de

I have used pgrouting on Windows 7 so I think this should work (everything else installed via stackbuilder)

What do you get for this query?

select * from ways where source = 24154 or target = 24157

charles

On Sep 13, 2011, at 8:37 AM, Daniel Kastl wrote:

Hi Ali,

I may be wrong, and if there are Windows users out there who know it better, please correct me.
But the binaries for pgRouting were not compiled with Windows 7. They might work, but not necessarily.

Daniel

On Tue, Sep 13, 2011 at 2:39 AM, Ali Taha <ali.taha@ritaj.ps> wrote:

Dear Daniel,

I downloaded them from http://www.pgrouting.org/download.html (windows binaries section pgRouting-1.03_pg-8.4.2)

I have windows 7 OS

Thanks

From: pgrouting-users-bounces@lists.osgeo.org [mailto:pgrouting-users-bounces@lists.osgeo.org] On Behalf Of Daniel Kastl
Sent: Tuesday, September 13, 2011 6:34 AM
To: pgRouting users mailing list
Subject: Re: [pgrouting-users] pgrouting installation

On Mon, Sep 12, 2011 at 11:20 AM, Ali Taha <ali.taha@ritaj.ps> wrote:

Dear All,

I am trying to setup and test pgrouting, I followed the setups but it is still not working. If ollowed the following steps:

1- Copay pgrouting libraries to …\pgsql\8.4\lib

From where did you copy them?

Did you compile? Which OS?

Daniel

2- Execute routing_core.sql and routing_core_wrappers.sql

3- Create a newtwork:

a. Added source and target fields

b. Execute Execute assign_vertex_id(‘

’, float tolerance, ‘<geometry column’, ‘’)

c. Added indices

d. Added reverse_cost column.

Then I used the following query to retrieve records:

SELECT * FROM shortest_path(‘

SELECT gid as id,

source::integer,

target::integer,

length::double precision as cost

FROM ways’,

24154,

24157,

false, false)

the query executes without errors, but return no data. I checked the table and the records seems OK.

is there a way to validate the database and verify the topology? How to make sure that the pgrouting library (dlls) are installed and working correctly?

Thanks


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


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de


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


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de


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

Hi Charles,

I got the following result (note that I am using my own ways data):

12058;12057;121;“0105000020E610000001000000010200000012000000D0BAFB60BC8B414080E097586B883F40F8F2C8ADB68B4140F1CB2CBE78883F4000A4F97AB68B4140C0A7FD3979883F40A8D05FA6B58B414080C457C47B883F4068ECFF14B58B414072D1E7827E883F40201E03CBB48B414001C86D6181883F40104D91CAB48B41409896CE4A84883F407853A813B58B41405945992987883F40287831A4B58B4140A12BAAE889883F40C85CBB4FB68B4140419F350A8C883F40784C7267B68B41401060B4488C883F4058257A4EB78B414080E8F82B8E883F4008C31D68B88B4140FF96BCB88F883F40089986A9B98B4140704BBFDF90883F40D08E5B06BB8B41400937B29591883F4088F63471BC8B414076C28DD391883F40888DED4DBD8B414020FE70BD91883F40F829FEC4C88B4140B372BD2198883F40”;24154;24155;121

12059;12058;151;“0105000020E610000001000000010200000005000000880B2FE4B88B41400052503B90883F4000E88B85AD8B41406F818066A4883F407883FE35A58B4140B765EAD6B4883F4050599362988B414070906BE5D3883F4048336500988B4140364027D3D4883F40”;24156;24157;151

Thanks

From: pgrouting-users-bounces@lists.osgeo.org [mailto:pgrouting-users-bounces@lists.osgeo.org] On Behalf Of Charles Galpin
Sent: Tuesday, September 13, 2011 3:55 PM
To: pgRouting users mailing list
Subject: Re: [pgrouting-users] pgrouting installation

I have used pgrouting on Windows 7 so I think this should work (everything else installed via stackbuilder)

What do you get for this query?

select * from ways where source = 24154 or target = 24157

charles

On Sep 13, 2011, at 8:37 AM, Daniel Kastl wrote:

Hi Ali,

I may be wrong, and if there are Windows users out there who know it better, please correct me.

But the binaries for pgRouting were not compiled with Windows 7. They might work, but not necessarily.

Daniel

On Tue, Sep 13, 2011 at 2:39 AM, Ali Taha <ali.taha@ritaj.ps> wrote:

Dear Daniel,

I downloaded them from http://www.pgrouting.org/download.html (windows binaries section pgRouting-1.03_pg-8.4.2)

I have windows 7 OS

Thanks

From: pgrouting-users-bounces@lists.osgeo.org [mailto:pgrouting-users-bounces@lists.osgeo.org] On Behalf Of Daniel Kastl
Sent: Tuesday, September 13, 2011 6:34 AM
To: pgRouting users mailing list
Subject: Re: [pgrouting-users] pgrouting installation

On Mon, Sep 12, 2011 at 11:20 AM, Ali Taha <ali.taha@ritaj.ps> wrote:

Dear All,

I am trying to setup and test pgrouting, I followed the setups but it is still not working. If ollowed the following steps:

1- Copay pgrouting libraries to …\pgsql\8.4\lib

From where did you copy them?

Did you compile? Which OS?

Daniel

2- Execute routing_core.sql and routing_core_wrappers.sql

3- Create a newtwork:

a. Added source and target fields

b. Execute Execute assign_vertex_id(‘

’, float tolerance, ‘<geometry column’, ‘’)

c. Added indices

d. Added reverse_cost column.

Then I used the following query to retrieve records:

SELECT * FROM shortest_path(‘

SELECT gid as id,

source::integer,

target::integer,

length::double precision as cost

FROM ways’,

24154,

24157,

false, false)

the query executes without errors, but return no data. I checked the table and the records seems OK.

is there a way to validate the database and verify the topology? How to make sure that the pgrouting library (dlls) are installed and working correctly?

Thanks


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


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de


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


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de


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

Without seeing the headers it’s hard to tell is this is ok. I guess it confirms the start/end points are there anyway.

I can only suggest you manually find a few links that you know are connected and try route that and see what happens. So start with your link with source 24154 and get the next link with a source that matches the first link target and so on for a few links and then choose the last target as the end point. Does that work?

charles

On Sep 13, 2011, at 9:10 AM, Ali Taha wrote:

Hi Charles,
I got the following result (note that I am using my own ways data):

Hi Carles

Well I guess I am in trouble now J, It seems the data is not ready for routing.

The paths are not continues because the lines are not breaked at each intersection.

Is there a tool (or plugin for QGIS) to clean the data by splitting lines at each intersection?

Thanks

From: pgrouting-users-bounces@lists.osgeo.org [mailto:pgrouting-users-bounces@lists.osgeo.org] On Behalf Of Charles Galpin
Sent: Tuesday, September 13, 2011 5:15 PM
To: pgRouting users mailing list
Subject: Re: [pgrouting-users] pgrouting installation

Without seeing the headers it’s hard to tell is this is ok. I guess it confirms the start/end points are there anyway.

I can only suggest you manually find a few links that you know are connected and try route that and see what happens. So start with your link with source 24154 and get the next link with a source that matches the first link target and so on for a few links and then choose the last target as the end point. Does that work?

charles

On Sep 13, 2011, at 9:10 AM, Ali Taha wrote:

Hi Charles,

I got the following result (note that I am using my own ways data):

On Sep 13, 2011, at 10:41 AM, Ali Taha wrote:

Hi Carles

Well I guess I am in trouble now J, It seems the data is not ready for routing.
The paths are not continues because the lines are not breaked at each intersection.

Is there a tool (or plugin for QGIS) to clean the data by splitting lines at each intersection?

Sorry to hear this, but at least you know why it's not working :slight_smile:

I do not know if there is a tool that can do this, but I am sure if there is, someone here or on the postgis list would know.

Best of luck,
charles

On Tue, Sep 13, 2011 at 8:41 AM, Ali Taha <ali.taha@ritaj.ps> wrote:

Hi Carles

Well I guess I am in trouble now J, It seems the data is not ready for routing.

The paths are not continues because the lines are not breaked at each intersection.

Hi Ali,

If your roads would not be connected at intersections, assign_vertex_id function can help you to snap them.
But there is no function in pgRouting to split them.

You might be able to use PostGIS functions for doing this, but it might happen that you split lines, where it shouldn’t be.

Daniel

Is there a tool (or plugin for QGIS) to clean the data by splitting lines at each intersection?

Thanks

From: pgrouting-users-bounces@lists.osgeo.org [mailto:pgrouting-users-bounces@lists.osgeo.org] On Behalf Of Charles Galpin
Sent: Tuesday, September 13, 2011 5:15 PM

To: pgRouting users mailing list
Subject: Re: [pgrouting-users] pgrouting installation

Without seeing the headers it’s hard to tell is this is ok. I guess it confirms the start/end points are there anyway.

I can only suggest you manually find a few links that you know are connected and try route that and see what happens. So start with your link with source 24154 and get the next link with a source that matches the first link target and so on for a few links and then choose the last target as the end point. Does that work?

charles

On Sep 13, 2011, at 9:10 AM, Ali Taha wrote:

Hi Charles,

I got the following result (note that I am using my own ways data):


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


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de

On Tue, Sep 13, 2011 at 8:41 AM, Ali Taha <ali.taha@ritaj.ps> wrote:

Hi Carles

Well I guess I am in trouble now J, It seems the data is not ready for routing.

The paths are not continues because the lines are not breaked at each intersection.

Hi Ali,

Look at this question GIS Stackexchange. Maybe it helps you to solve your problem:
http://gis.stackexchange.com/questions/13544/split-edges-at-intersections-in-postgis

Daniel

Is there a tool (or plugin for QGIS) to clean the data by splitting lines at each intersection?

Thanks

From: pgrouting-users-bounces@lists.osgeo.org [mailto:pgrouting-users-bounces@lists.osgeo.org] On Behalf Of Charles Galpin
Sent: Tuesday, September 13, 2011 5:15 PM

To: pgRouting users mailing list
Subject: Re: [pgrouting-users] pgrouting installation

Without seeing the headers it’s hard to tell is this is ok. I guess it confirms the start/end points are there anyway.

I can only suggest you manually find a few links that you know are connected and try route that and see what happens. So start with your link with source 24154 and get the next link with a source that matches the first link target and so on for a few links and then choose the last target as the end point. Does that work?

charles

On Sep 13, 2011, at 9:10 AM, Ali Taha wrote:

Hi Charles,

I got the following result (note that I am using my own ways data):


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


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de

Dear All,

I used grass GIS to fix the data, the routing engine worked, in the attached a screenshot of the result, it started from the next point near the start point until the first point next to the stop point. Is this the way pgrouting works or I have something wrong?

Thanks

From: pgrouting-users-bounces@lists.osgeo.org [mailto:pgrouting-users-bounces@lists.osgeo.org] On Behalf Of Daniel Kastl
Sent: Wednesday, September 14, 2011 4:29 PM
To: pgRouting users mailing list
Subject: Re: [pgrouting-users] pgrouting installation

On Tue, Sep 13, 2011 at 8:41 AM, Ali Taha <ali.taha@ritaj.ps> wrote:

Hi Carles

Well I guess I am in trouble now J, It seems the data is not ready for routing.

The paths are not continues because the lines are not breaked at each intersection.

Hi Ali,

Look at this question GIS Stackexchange. Maybe it helps you to solve your problem:

http://gis.stackexchange.com/questions/13544/split-edges-at-intersections-in-postgis

Daniel

Is there a tool (or plugin for QGIS) to clean the data by splitting lines at each intersection?

Thanks

From: pgrouting-users-bounces@lists.osgeo.org [mailto:pgrouting-users-bounces@lists.osgeo.org] On Behalf Of Charles Galpin
Sent: Tuesday, September 13, 2011 5:15 PM

To: pgRouting users mailing list
Subject: Re: [pgrouting-users] pgrouting installation

Without seeing the headers it’s hard to tell is this is ok. I guess it confirms the start/end points are there anyway.

I can only suggest you manually find a few links that you know are connected and try route that and see what happens. So start with your link with source 24154 and get the next link with a source that matches the first link target and so on for a few links and then choose the last target as the end point. Does that work?

charles

On Sep 13, 2011, at 9:10 AM, Ali Taha wrote:

Hi Charles,

I got the following result (note that I am using my own ways data):


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


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de

route.jpg

A-Star and Dijkstra start from a source or target point of an edge, Shooting Star starts from an edge.
If you want to make the route start in the middle of an edge you need to split this edge. PostGIS has a substring function for that, which may be useful.

Daniel

On Sun, Sep 18, 2011 at 1:49 AM, Ali Taha <ali.taha@ritaj.ps> wrote:

Dear All,

I used grass GIS to fix the data, the routing engine worked, in the attached a screenshot of the result, it started from the next point near the start point until the first point next to the stop point. Is this the way pgrouting works or I have something wrong?

Thanks

From: pgrouting-users-bounces@lists.osgeo.org [mailto:pgrouting-users-bounces@lists.osgeo.org] On Behalf Of Daniel Kastl
Sent: Wednesday, September 14, 2011 4:29 PM

To: pgRouting users mailing list
Subject: Re: [pgrouting-users] pgrouting installation

On Tue, Sep 13, 2011 at 8:41 AM, Ali Taha <ali.taha@ritaj.ps> wrote:

Hi Carles

Well I guess I am in trouble now J, It seems the data is not ready for routing.

The paths are not continues because the lines are not breaked at each intersection.

Hi Ali,

Look at this question GIS Stackexchange. Maybe it helps you to solve your problem:

http://gis.stackexchange.com/questions/13544/split-edges-at-intersections-in-postgis

Daniel

Is there a tool (or plugin for QGIS) to clean the data by splitting lines at each intersection?

Thanks

From: pgrouting-users-bounces@lists.osgeo.org [mailto:pgrouting-users-bounces@lists.osgeo.org] On Behalf Of Charles Galpin
Sent: Tuesday, September 13, 2011 5:15 PM

To: pgRouting users mailing list
Subject: Re: [pgrouting-users] pgrouting installation

Without seeing the headers it’s hard to tell is this is ok. I guess it confirms the start/end points are there anyway.

I can only suggest you manually find a few links that you know are connected and try route that and see what happens. So start with your link with source 24154 and get the next link with a source that matches the first link target and so on for a few links and then choose the last target as the end point. Does that work?

charles

On Sep 13, 2011, at 9:10 AM, Ali Taha wrote:

Hi Charles,

I got the following result (note that I am using my own ways data):


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


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de


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


Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: http://georepublic.de