[pgrouting-users] shootingstar_sp vs shortest_path_shooting_star

Stephen Woodbridge woodbri at swoodbridge.com
Mon Dec 5 20:10:03 EST 2011

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.

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.

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.


On 12/5/2011 5:17 PM, John Williams wrote:
> On Mon, Dec 5, 2011 at 12:33 PM, Stephen Woodbridge
> <woodbri at swoodbridge.com <mailto:woodbri at swoodbridge.com>> wrote:
>     On 12/5/2011 11:32 AM, John Williams wrote:
>         I've got directions working fairly well using the shootingstar_sp
>         example from the workshop on the website. Now, I'm trying to get
>         one-way
>         streets working. Can this be done with shootingstar_sp? ...or do
>         I have
>         to use shortest_path_shooting_star()? Can someone tell me the
>         difference? I've found shortest_path_shooting_star in the
>         documentation,
>         but not shootingstar_sp.
>         Thanks...
>     Yes you can do oneway streets in shooting star.
>     create a column "reverse_cost" then set reverse_cost = cost and then
>     set the cost or reverse cost to 10000 for the wrong way.
>     sone you call shortest_path_shooting_star(.. .., directed,
>     has_reverse_cost) and set both directed and has_reverse_cost to "true".
> 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:
> SELECT rt.gid, ST_AsGeoJSON(the_geom) AS geojson, ways.the_geom,
>                ST_Length(ST_GeographyFromText(ST_AsText(ways.the_geom)))
> as meters,
>                length(the_geom) AS length, name, source, target, x1, y1,
> x2, y2, ways.gid
> from (select edge_id as gid from shortest_path_shooting_star('select gid
> as id, source, target, x1, y1, x2, y2, to_cost, to_cost as cost, rule,
> reverse_cost from ways', 763081, 753436, true, true)) as rt, ways where
> rt.gid = ways.gid
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users

More information about the Pgrouting-users mailing list