[pgrouting-users] Shooting star problem

Daniel Kastl daniel at georepublic.de
Mon Dec 20 05:11:53 EST 2010


Hi Espen,

Your projection unit is "meter", I guess. So if you decrease your bounding
box to 10, then, there are no other edges in your select than the two you
want to get as a result.
But thank you for trying this, because it shows, that your result passes one
link twice. Could you find out, if the cost of passing edge 157333 twice
would be higher than taking the "long" way?
Then the search result would be correct, but of course trying to pass one
edge twice wouldn't be OK.

Thank you for reporting this!

Daniel


2010/12/20 Espen Isaksen <espen.isaksen at gmail.com>

> Hi!
>
> I am running the following query:
>
> SELECT gid
> FROM shootingstar_sp('elveg',157332,157333,100, 'cost', true, true);
>
> and I get:
>
>  gid
> --------
>  157332
>  157333
> (2 rows)
>
>
> which seems correct. Now if i flip the direction with the this query:
>
> SELECT gid
> FROM shootingstar_sp('elveg',157333,157332,100, 'cost', true, true)
>
> then I get:
>
>  gid
> --------
>  157333
>  159163
>  155337
>  155336
>  158776
>  157332
> (6 rows)
>
> which is not correct. There should not be any extra costs on the edges:
>
>  gid   |       cost       |   reverse_cost   | to_cost | rule
> --------+------------------+------------------+---------+------
>  157332 | 61.7253486704361 | 61.7253486704361 |         |
>  157333 |         104.8033 |         104.8033 |         |
> (2 rows)
>
>
> >From my understanding I should get 2 rows in both queries. Am I
> missing something here?
>
> If I decrease the bounding box in the second query to 10, then I get
> this result:
>
>  gid
> --------
>  157333
>  157333
>  157332
> (3 rows)
>
> I thought I should get the same result for a larger bounding box as
> long as the shortest path(least cost) is within the smallest bounding
> box?
>
> Image of the road network can be seen here:
> http://dl.dropbox.com/u/8829/road_network.png
>
> Espen
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>



-- 
Georepublic UG & Georepublic Japan
eMail: daniel.kastl at georepublic.de
Web: http://georepublic.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20101220/5e832923/attachment.html


More information about the Pgrouting-users mailing list