Opened 10 years ago

Closed 10 years ago

#2004 closed enhancement (fixed)

routing should respect the `to` members of a turn restriction

Reported by: dmgroom Owned by: David Dean
Priority: minor Milestone:
Component: gosmore Version:
Keywords: Cc:

Description

Gosmore currently ignores relation = restriction when calculating the routing.

Change History (7)

comment:1 Changed 10 years ago by David Dean

gosmore currently does have support for some restriction relations, but I don't think it can currently handle restrictions with ways as the via.

If your restriction is a simple no_*_turn with from and to ways and a via node it should work.

comment:2 Changed 10 years ago by David Dean

Some details on the operation can be gleaned from this thread: http://lists.openstreetmap.org/pipermail/routing/2008-August/000387.html

comment:3 Changed 10 years ago by David Dean

David Groom wrote:

Here is turn restriction relation I created http://www.openstreetmap.org/browse/relation/30772/history last edited on 8 June and here's a route which doesn't obey the restriction I tried to create

http://www.yournavigation.org/?flat=50.681478&flon=-1.143316&tlat=50.677831&tlon=-1.144155&v=motorcar&fast=1&layer=mapnik

comment:4 Changed 10 years ago by David Dean

Owner: changed from ddean@… to David Dean
Priority: majorminor
Status: newassigned
Summary: routing should take notice of turn restrictionsrouting should respect the `to` members of a turn restriction

OK, I've had a look at the code in gosmore, and it turns out that the no_right_turn restriction is only based on the angle of travel as you leave the from way. I don't think the via or to members of the relation are considered at all. As the angle between the from way and the to way are within a 90 degree angle centred on the from way, gosmore currently views this as a straight_on corner and ignores the no_right_turn restriction accordingly.

So as gosmore currently stands, this would have to be changed to a no_straight_on restriction for it to work. This seems like a problem with gosmore's current method of interpreting turning restrictions, and I have updated the title of the bug to reflect this.

Ideally it seems that the angle of the turn should have no impact on the restriction, and it should only be determined by the from, via and to members and whether it is a no_* or only_* restriction.

comment:5 Changed 10 years ago by Thomas Wood

In short, the original implementation of restriction handling in gosmore was no-brained and crazy, since it ignored the tagging spec?

comment:6 in reply to:  5 Changed 10 years ago by dmgroom

Replying to grand.edgemaster@gmail.com:

In short, the original implementation of restriction handling in gosmore was no-brained and crazy, since it ignored the tagging spec?

I suspect that rather than "no-brained and crazy" it was more a case of the original Gosmore routing being developed before the current relation tagging came into practice.

comment:7 Changed 10 years ago by nroets@…

Resolution: fixed
Status: assignedclosed

In 2008, I created a file called routingTest.osm for testing gosmore (or any other routing software). Routing around the outside is the desired behaviour. My interpretation was then that the angle should be considered and gosmore passed the test at that time.

I recently changed the file so that angles are no longer considered and changed only_* from being a restriction to an enforcement. I changed gosmore and it now passes the test. Everything is in SVN.

Note: See TracTickets for help on using tickets.