Okay, I switched to Dijkstra's algorithm (shortest_path()) and it seems to work fine. Thanks a lot for the help, Stephen.<br><br><br><div class="gmail_quote">On Mon, Dec 5, 2011 at 7:10 PM, Stephen Woodbridge <span dir="ltr"><<a href="mailto:woodbri@swoodbridge.com">woodbri@swoodbridge.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I think shooting star on version 1.05 is broken at least for turn restrictions based on some test I've recently done.I think the we had to go back to 1.02 to get the turn restrictions to work.<br>
<br>
Regarding oneway streets, there has been some discussion, maybe in a ticket, that oneway streets are really working but that the costs were getting reported incorrectly. I would create a very simple graph of about 10 edges and and make some of them oneway to force the route an otherwise longer way through the network on oneway streets than it could go if it ignored the oneway streets and see what the results are. If it really is bad then you have a trivial example that you can attach to a ticket that demonstrates the problem.<br>
<br>
One of the things that I am advocating and have started developing are some simple sql files the build a graph and solve it and compare the results to an expected results files. I want to build a suite of these for an automated test suite that can be run before code checkins and before releases to validate them. I have already started building some of these as I have spare time. I would be happy to add any that users want to develop also. Keep the networks small in number of nodes and edges makes them easier to debug and easier to build and understand. In some of the ones I build, I have been surprised that the result was not my expected result, but valid none the less.<br>
<br>
Thanks,<br>
-Steve<div class="im"><br>
<br>
On 12/5/2011 5:17 PM, John Williams wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On Mon, Dec 5, 2011 at 12:33 PM, Stephen Woodbridge<br></div><div class="im">
<<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a> <mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>> wrote:<br>
<br>
On 12/5/2011 11:32 AM, John Williams wrote:<br>
<br>
I've got directions working fairly well using the shootingstar_sp<br>
example from the workshop on the website. Now, I'm trying to get<br>
one-way<br>
streets working. Can this be done with shootingstar_sp? ...or do<br>
I have<br>
to use shortest_path_shooting_star()? Can someone tell me the<br>
difference? I've found shortest_path_shooting_star in the<br>
documentation,<br>
but not shootingstar_sp.<br>
<br>
Thanks...<br>
<br>
<br>
<br>
Yes you can do oneway streets in shooting star.<br>
<br>
create a column "reverse_cost" then set reverse_cost = cost and then<br>
set the cost or reverse cost to 10000 for the wrong way.<br>
<br></div>
sone you call shortest_path_shooting_star(.. .., directed,<div class="im"><br>
has_reverse_cost) and set both directed and has_reverse_cost to "true".<br>
<br>
<br>
Great, thanks. I used osm2po to convert osm data to routing data and it<br>
appears to have set the appropriate reverse_costs to 1000000. However,<br>
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_<u></u>GeographyFromText(ST_AsText(<u></u>ways.the_geom)))<br>
as meters,<br>
length(the_geom) AS length, name, source, target, x1, y1,<br>
x2, y2, ways.gid<br>
from (select edge_id as gid from shortest_path_shooting_star('<u></u>select gid<br>
as id, source, target, x1, y1, x2, y2, to_cost, to_cost as cost, rule,<br>
reverse_cost from ways', 763081, 753436, true, true)) as rt, ways where<br>
rt.gid = ways.gid<br>
<br>
<br></div><div class="im">
______________________________<u></u>_________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.<u></u>org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/pgrouting-<u></u>users</a><br>
</div></blockquote><div class="HOEnZb"><div class="h5">
<br>
______________________________<u></u>_________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.<u></u>org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/pgrouting-<u></u>users</a><br>
</div></div></blockquote></div><br>