<div>hi Stephen</div>
<div>&nbsp;</div>
<div>i got</div>
<div>&nbsp;</div>
<div>&quot;oneway&quot;;&quot;count&quot;<br>-1;1451<br>0;21403<br>1;2640<br></div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>0=both ways</div>
<div>-1=B-&gt;A</div>
<div>1= A-&gt;B</div>
<div>&nbsp;</div>
<div>RG.<br><br></div>
<div class="gmail_quote">2009/2/12 Stephen Woodbridge <span dir="ltr">&lt;<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Valeria,<br><br>What do you get for this query:<br><br>select distinct oneway, count(*) as count from calle group by oneway, order by oneway;<br>
<br>If you have a street A-------&gt;B then the oneway flag probable needs 3 values. 0 for both ways, 1? for A to B, and maybe 2? for B to A. You need to figure out which values are which.<br><br>Then you need cost or reverse cost based on the value of oneway.<br>
<br>-Steve<br><br>Valeria Muņoz wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="Ih2E3d">hi Daniel, thanks for the link..<br>&nbsp;I did the following:<br>&nbsp;* UPDATE calle SET to_cost=length(the_geom), reverse_cost=length(the_geom); *<br>* * <br>* UPDATE calle SET reverse_cost=reverse_cost + 1000000 WHERE oneway!=0 , &nbsp;oneway!=0 are one way streets. *<br>
<br>my query:<br>&nbsp;<br>SELECT edge_id as gid,cost as length FROM shortest_path_astar(&#39;SELECT gid AS id,source::int4, target::int4, to_cost::double precision as cost, reverse_cost::double precision, x1,y1,x2,y2 FROM calle&#39;,3412,3411,false,true)**<br>
<br>&nbsp;this do not works 100%, with some street works with others no...<br>&nbsp;I am missing something?<br>&nbsp;RG<br><br></div>2009/2/11 Daniel Kastl &lt;<a href="mailto:kastl@orkney.co.jp" target="_blank">kastl@orkney.co.jp</a> &lt;mailto:<a href="mailto:kastl@orkney.co.jp" target="_blank">kastl@orkney.co.jp</a>&gt;&gt; 
<div class="Ih2E3d"><br><br>&nbsp; &nbsp;So I guess pgRouting doesn&#39;t know that there is a one way street.<br>&nbsp; &nbsp;You might want to read this:<br>&nbsp; &nbsp;<a href="http://pgrouting.postlbs.org/wiki/OneWayStreets" target="_blank">http://pgrouting.postlbs.org/wiki/OneWayStreets</a><br>
<br>&nbsp; &nbsp;Daniel<br><br><br>&nbsp; &nbsp;Valeria Muņoz schrieb:<br>&nbsp; &nbsp; &gt; HI!!<br>&nbsp; &nbsp; &gt;<br>&nbsp; &nbsp; &gt; &nbsp; &nbsp; &nbsp; I have a little problem with my routing, the best path from<br>&nbsp; &nbsp;A to<br>&nbsp; &nbsp; &gt; B do not respect the traffic direction.<br>
&nbsp; &nbsp; &gt; attached image.<br>&nbsp; &nbsp; &gt;<br>&nbsp; &nbsp; &gt; please check in the example vicente perez rosales street<br>&nbsp; &nbsp; &gt;<br>&nbsp; &nbsp; &gt; Query<br>&nbsp; &nbsp; &gt;<br>&nbsp; &nbsp; &gt; rt.gid,rt.the_geom AS tg, AsText(rt.the_geom) AS wkt,<br>&nbsp; &nbsp; &gt; length(rt.the_geom) AS length, calle.gid FROM calle, (SELECT gid,<br>
&nbsp; &nbsp; &gt; the_geom FROM dijkstra_sp_delta( &#39;calle&#39;, 3414, 3406, 3000) ) as rt<br>&nbsp; &nbsp; &gt; WHERE calle.gid=rt.gid;<br>&nbsp; &nbsp; &gt;<br>&nbsp; &nbsp; &gt;<br>&nbsp; &nbsp; &gt; RG<br>&nbsp; &nbsp; &gt;<br>&nbsp; &nbsp; &gt;<br>&nbsp; &nbsp;------------------------------------------------------------------------<br>
&nbsp; &nbsp; &gt;<br>&nbsp; &nbsp; &gt;<br>&nbsp; &nbsp;------------------------------------------------------------------------<br>&nbsp; &nbsp; &gt;<br>&nbsp; &nbsp; &gt; _______________________________________________<br>&nbsp; &nbsp; &gt; Pgrouting-users mailing list<br>&nbsp; &nbsp; &gt; <a href="mailto:Pgrouting-users@lists.postlbs.org" target="_blank">Pgrouting-users@lists.postlbs.org</a><br>
</div>&nbsp; &nbsp;&lt;mailto:<a href="mailto:Pgrouting-users@lists.postlbs.org" target="_blank">Pgrouting-users@lists.postlbs.org</a>&gt; 
<div class="Ih2E3d"><br>&nbsp; &nbsp; &gt; <a href="http://lists.postlbs.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.postlbs.org/mailman/listinfo/pgrouting-users</a><br>&nbsp; &nbsp; &gt;<br><br><br><br>------------------------------------------------------------------------<br>
<br>_______________________________________________<br>Pgrouting-users mailing list<br><a href="mailto:Pgrouting-users@lists.postlbs.org" target="_blank">Pgrouting-users@lists.postlbs.org</a><br><a href="http://lists.postlbs.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.postlbs.org/mailman/listinfo/pgrouting-users</a><br>
</div></blockquote><br></blockquote></div><br>