On Mon, Dec 5, 2011 at 12:33 PM, Stephen Woodbridge <span dir="ltr">&lt;<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="HOEnZb"><div class="h5">On 12/5/2011 11:32 AM, John Williams wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I&#39;ve got directions working fairly well using the shootingstar_sp<br>
example from the workshop on the website. Now, I&#39;m trying to get one-way<br>
streets working. Can this be done with shootingstar_sp? ...or do I have<br>
to use shortest_path_shooting_star()? Can someone tell me the<br>
difference? I&#39;ve found shortest_path_shooting_star in the documentation,<br>
but not shootingstar_sp.<br>
<br>
Thanks...<br>
</blockquote>
<br>
<br></div></div>
Yes you can do oneway streets in shooting star.<br>
<br>
create a column &quot;reverse_cost&quot; then set reverse_cost = cost and then set the cost or reverse cost to 10000 for the wrong way.<br>
<br>
sone you call shortest_path_shooting_star(..<u></u>.., directed, has_reverse_cost) and set both directed and has_reverse_cost to &quot;true&quot;.<br>
<br></blockquote><div><br>Great, thanks. I used osm2po to convert osm data to routing data and it appears to have set the appropriate reverse_costs to 1000000. However, this query still ignores one-way streets:<br><br>SELECT rt.gid, ST_AsGeoJSON(the_geom) AS geojson, ways.the_geom, <br>
              ST_Length(ST_GeographyFromText(ST_AsText(ways.the_geom))) as meters,
                        <br>              length(the_geom) AS length, name, source, target, x1, y1, x2, y2, ways.gid 
        <br>from (select edge_id as gid from shortest_path_shooting_star(&#39;select gid as id, source, target, x1, y1, x2, y2, to_cost, to_cost as cost, rule, reverse_cost from ways&#39;,
                763081, 753436, true, true)) as rt, ways where rt.gid = ways.gid <br></div></div>