[pgrouting-users] shootingstar_sp vs shortest_path_shooting_star

John Williams jdwilliams1982 at gmail.com
Tue Dec 6 11:07:09 EST 2011


Okay, I switched to Dijkstra's algorithm (shortest_path()) and it seems to
work fine. Thanks a lot for the help, Stephen.


On Mon, Dec 5, 2011 at 7:10 PM, Stephen Woodbridge
<woodbri at swoodbridge.com>wrote:

> 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.
>
> Thanks,
>  -Steve
>
>
> 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<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 <Pgrouting-users at lists.osgeo.org>
>> http://lists.osgeo.org/**mailman/listinfo/pgrouting-**users<http://lists.osgeo.org/mailman/listinfo/pgrouting-users>
>>
>
> ______________________________**_________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.**org <Pgrouting-users at lists.osgeo.org>
> http://lists.osgeo.org/**mailman/listinfo/pgrouting-**users<http://lists.osgeo.org/mailman/listinfo/pgrouting-users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20111206/4dd6083c/attachment.html


More information about the Pgrouting-users mailing list