Here's an idea:
Model intersection nodes like B as as a set of entry/exit points to the
intersection. In your case there would be three such nodes, BA, BC and BD,
each representing the entry/exit to the road to destinations A, C and D.
The relationships between the different nodes of B would all be of a
different type than the road relationships. Traversing the graph needs a
rule that you can *never traverse two intersection relationships in a
row*(cannot drive round and round in the intersection). Then all you
add is a direction constraint to the intersection relationships, and you
will have achieved your goal.
- A---BA, bi-directional road
- C---BC, bi-directional road
- D---BD, bi-directional road
- BA---BD, bi-directional
- BA---BC, bi-directional
- BC-->BD, only one direction - you cannot turn from D to C, only from C
So, as long as your traversal algorithm respects the direction of the
relationships (both road and interesection) and also enforces the rule that
you can never traverse two intersection relationships in a row, then you
will not be able to take a right turn from D to C through the intersection.
On Tue, Aug 14, 2012 at 10:41 AM, Benoît Lafontaine <joel1...@gmail.com>wrote: