[pgrouting-users] pgrouting serverscript produces multiple ways but many wrong.

Stephen Woodbridge woodbri at swoodbridge.com
Fri Oct 25 07:49:45 PDT 2013


On 10/19/2013 2:02 PM, Hishan Melanga wrote:
> Hi everyone,
> Currently I am trying to interface pgrouting with OSMDroidBonus pack.
> I am using the older pgrouting library 1.5.
> I modified the older phpserverscript to produce geoJSON output. Server
> script can be found in the following link.
> https://www.dropbox.com/s/la3ettzc30wk8ne/congestRouting.php
> The problem is the script produces several paths including the correct path.
> Inline image 1
> I do not understand why my server script is producing wrong
> geo-coordinates as well. Please help me.
> Thanks in advance.

Hi Hishan,

You have a lot of pieces to this puzzle like:

1. where is the input coming from? Where is it getting passed to? is it 
getting passed correctly?
2. what is the SQL query that is getting generated?
3. If you plug the SQL into psql or pgadmin is it generating the correct 
(or expected) results?
4. If not, is the problem with pgrouting or the data you loaded?
5. are the results from the SQL (right or wrong) getting passed back to 
you application correctly? ie: is the out output of the SQL the SAME as 
what your application is getting?
6. Is the application displaying the results correctly? How do you know?

To debug the PHP you can write messages to stderr and they should show 
up in the apache error.log file.

I think you have a some work to debug your application and locate where 
in all of this something is going wrong and what is going wrong. If it 
is in pgRouting, then maybe you can post a small test that we can run in 
pgadmin or psql.

Also, we are not doing anything to support or fix bugs in 1.x series 
unless it is funded. I strongly recommend that you upgrade to pgRouting 2.0

Best regards,
   -Steve


More information about the Pgrouting-users mailing list