[pgrouting-users] Problem with way restrictions in shooting star if you have more then one rule for an edge

Max Weninger max.weninger at gmail.com
Wed Jan 11 10:11:50 EST 2012


Thanks for providing the shooting star algorithm.
I am using your shooting star code. The only difference
is that I use a sqlite3 DB instead of postgres. So I only
"adapted" the code of fetching the data from DB to use
the sqlite3 API. The rest of the code is as it is in the
git repository at the moment.

The routing works find in general I only have problems
using certain "types" of turn restrictions. In special 
as soon as there is more then one rule for an edge

It seems that it only "respects" the first rule for
turn restrictions and always ignore the other ones.

I correctly provide the "same" edge for every rule and AFAIKT
adjacent_edges is correctly filled with all the rules for this edge.
After that I am "lost" how the "boost" algorithm actually works
and at which point the information from adjacent_edges is used
during routing.

I also tried the same "osm data" with the "original" code
from a postgres DB and the result is the same

An example where it happens is here 
routing from http://www.openstreetmap.org/browse/way/34849107
to http://www.openstreetmap.org/browse/way/96379178

As you can see it is not allowed to go "straight" on
still shooting star returns exactly this route

way http://www.openstreetmap.org/browse/way/96379178 has two rules with
to_cost > 100000

from http://www.openstreetmap.org/browse/way/96379173 (only straight on)
and as a second one
from http://www.openstreetmap.org/browse/way/34849107 (only styraight
on)but the second one seems to be ignored and thefore choosen for the route

The correct routing would be to go right to the next roundabout 
and back which definitly has a lower cost.

So maybe you can give me some hints how I can debug where the
rules are "evaluated" to see if my "assumptions" are correct



More information about the Pgrouting-users mailing list