Hi Espen,<div><br></div><div>Your projection unit is &quot;meter&quot;, 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.</div><div>

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 &quot;long&quot; way?</div><div>Then the search result would be correct, but of course trying to pass one edge twice wouldn&#39;t be OK.</div>

<div><br></div><div>Thank you for reporting this!</div><div><br></div><div>Daniel</div><div><br><br><div class="gmail_quote">2010/12/20 Espen Isaksen <span dir="ltr">&lt;<a href="mailto:espen.isaksen@gmail.com">espen.isaksen@gmail.com</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi!<br>
<br>
I am running the following query:<br>
<br>
SELECT gid<br>
FROM shootingstar_sp(&#39;elveg&#39;,157332,157333,100, &#39;cost&#39;, true, true);<br>
<br>
and I get:<br>
<br>
  gid<br>
--------<br>
 157332<br>
 157333<br>
(2 rows)<br>
<br>
<br>
which seems correct. Now if i flip the direction with the this query:<br>
<br>
SELECT gid<br>
FROM shootingstar_sp(&#39;elveg&#39;,157333,157332,100, &#39;cost&#39;, true, true)<br>
<br>
then I get:<br>
<br>
  gid<br>
--------<br>
 157333<br>
 159163<br>
 155337<br>
 155336<br>
 158776<br>
 157332<br>
(6 rows)<br>
<br>
which is not correct. There should not be any extra costs on the edges:<br>
<br>
  gid   |       cost       |   reverse_cost   | to_cost | rule<br>
--------+------------------+------------------+---------+------<br>
 157332 | 61.7253486704361 | 61.7253486704361 |         |<br>
 157333 |         104.8033 |         104.8033 |         |<br>
(2 rows)<br>
<br>
<br>
&gt;From my understanding I should get 2 rows in both queries. Am I<br>
missing something here?<br>
<br>
If I decrease the bounding box in the second query to 10, then I get<br>
this result:<br>
<br>
  gid<br>
--------<br>
 157333<br>
 157333<br>
 157332<br>
(3 rows)<br>
<br>
I thought I should get the same result for a larger bounding box as<br>
long as the shortest path(least cost) is within the smallest bounding<br>
box?<br>
<br>
Image of the road network can be seen here:<br>
<a href="http://dl.dropbox.com/u/8829/road_network.png" target="_blank">http://dl.dropbox.com/u/8829/road_network.png</a><br>
<br>
Espen<br>
_______________________________________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org">Pgrouting-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">Georepublic UG &amp; Georepublic Japan<br>eMail: <a href="mailto:daniel.kastl@georepublic.de" style="color:rgb(66, 99, 171)" target="_blank">daniel.kastl@georepublic.de</a><br>

Web: <a href="http://georepublic.de/" style="color:rgb(66, 99, 171)" target="_blank">http://georepublic.de</a></span><br>
</div>