[pgrouting-users] pgrouting2 and turn restrictions

Stephen Woodbridge woodbri at swoodbridge.com
Fri Oct 25 07:26:15 PDT 2013


On 10/22/2013 4:50 AM, Yaron Lev wrote:
> Hi,
>
> I have a small question.
>
> Most of the algos do not take turn restrictions into account.

Yes this is correct. Only the TRSP code handles turn restrictions.

> If wanted to use for example pgr_ksp (k-shortest path) for example, then
> that algo will not take turn restrictions into account.

It might be feasible to implement the KSP algorithm on top of TRSP.
https://github.com/pgRouting/pgrouting/issues/206
If you are interested in developing something and submitting a pull 
request or funding this it would be a great contribution. Or if you have 
funding, we can look at getting getting something developed.

> The only way i could think about making the algo's work, is to rewire
> the graph table, so that nodes with turn restrictions, will be removed
> and instead adding longer edges instead to cover all the travel options.
> (for each edge, that contains the node in question, append and rewire,
> its a bit complicated but you should get the idea from my very limited
> description)

Yes, when I researched ways to solve turn restriction, I did find 
articles about how it is possible to reconstruct a graph around turn 
restrictions by removing and adding edges to make a "regular" graph that 
would generate the equivalent of the turn restricted routes. But it 
seemed very complicated.

> My question is, is there such a tool which extends the graph table as
> produced by either osm2po or osm2pgrouting for turn restrictions?

Not that I know of. I think the OSM routing engine does support turn 
restrictions, but it is not part of pgRouting.

> Is there a different solution i am missing?

Sorry not that I know of. This is a good suggestion.

Regards,
   -Steve

> Thanks for your help!
>
>
> _______________________________________________
> 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