shootingstar (#18) - Turn restrictions modelled with infinite "to_cost" (#376) - Message List

Turn restrictions modelled with infinite "to_cost"

I have recently loaded the UK Ordnance Survey Meridian2 data set into PostGIS, and after some considerable effort I have managed to build a reasonable network topology for use with Shooting Star. (Essentially, I am using turning restrictions to model bridges across motorways and trunk roads, as there are multi-level nodes at all of these points in the source data.)

However, I have encountered some strange variability in the results, in that the algorithm seems to ignore the turning restrictions for some high "delta" values. (I can understand that it would have to ignore turning restrictions at lower "delta" values if there is no alternative route - but not at higher values!) I have been unable to solve this regardless of how high I set the "to_cost".

In an ideal world I would like to set an _infinite_ "to_cost" - i.e. I want to tell the shooting star algorithm to never allow this turn, regardless of the "delta" value. For me, it is better to receive no routing result than one with an off-bridge turn!

Can anyone give me an indication of how I could achieve this?

Many thanks in advance,

Rob.

  • Message #1604

    Hi Rob,

    First, 'delta' has nothing to do with turn restrictions - it is just an additional area around bounding box which cuts out a sub-graph from entire road graph to reduce data loading time.

    I'm afraid you can't completely exclude restricted turns. What you can do is to assign pretty high 'to_cost' values and then at your application side you can check complete route cost and if it is higher than this value, you can assume that the shortest route goes through restricted turn and thus there is no route without restrictions.

    I hope it helps.

    Cheers, Anton.