Let me give a bit more background. Some routing applications don't care about turn restrictions. Or they have one routing module (plugin) that does care and one that doesn't. If it doesn't care then the OSM nodes are the vertexes in your routing graph.
But if you do take turn restrictions into account, then the vertexes are states, such as "I am on segment X traveling forwards (or backwards)". That makes the problem approximately 3 times larger (depending on the ratio of segments to nodes). Now if you are wondering if we can't just use the simpler method when we are 2 or 3 nodes away from all turn restrictions, consider this (Click on 'Recommended') : http://nroets.dev.openstreetmap.org/demo/?lat=-25.78512&lon=28.30018&zoom=16&markers=!-25.7853,28.3048!-25.78417,28.3036&v=motorcar&fast=1&layers=B000FTFT The router comes up with a complicated route to turn the car around. (Personally I would use a miniroundabout to turn the car around, but that is illegal in some countries.) Conclusion: The turn restriction is only on the service and the secondary, but it affect 8 additional nodes and some are quite far from the turn restriction. On Sat, Jul 17, 2010 at 9:19 PM, Apollinaris Schoell <[email protected]> wrote: > > On 17 Jul 2010, at 11:36 , Marcus Wolschon wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Am 17.07.2010 19:20, schrieb Apollinaris Schoell: >>> >>> In this example it seems just too easy for a good router to do the >>> right thing without hard facts. >> >> >> How? >> Please post the algorithm you are thinking about. >> > > typical intersection like this one requires 2 turns > > 70-110 degree from main road to ramp and 5-20 degree from ramp to trunk > > the cloudmade route choose 80degree + 160 degree turn when it was possible > with nearly exact same length to do 110 degree + 5 degree > I think something like a exponential cost increase for the angle of a turn > will result in 90% of the unclear situations > > >>> This can be done by the router or some intelligent preprocessing >>> if compute time is critical as an example mkgmap does these type of >>> preprocessing to reduce the number of unnecessary announcements and >>> creates the routing graph accordingly. >> >> Details? > > I haven't done any of this or looked into the code. Mark explained a bit in > some postings in the mkgmap dev list. > just to be clear. this is not for the routing itself just for the > announcements. Don't announce if the angle is small and roads continue with > similar tags. the routing itself is done by the Garmin device > >> >>> >>> We might reach the state where all rouads are mapped with lanes, >>> yellow lines, all turn restrictions … >> >> Actually, over here we have cities where all streets are there and >> people start mapping >> single trees and individual lamp-posts. >> > > you are so lucky! in US there is lot of imported data of questionable > quality. But even with plain tiger data routing is possible. there is a > program for that. but I have never tested how good it is. so it is possible > to fix things on the router side > > > > _______________________________________________ > Routing mailing list > [email protected] > http://lists.openstreetmap.org/listinfo/routing > _______________________________________________ Routing mailing list [email protected] http://lists.openstreetmap.org/listinfo/routing
