logo separator

[mkgmap-dev] [Patch v1] some restrictions are ignored

From Gerd Petermann gpetermann_muenchen at hotmail.com on Wed Dec 18 16:31:46 GMT 2013






Hi all,

okay, found the answer. The problem is this:
To store a restriction in the img file
we have to calculate three nodes (points which are connecting highways).
One is the via node (which is also specified in OSM, others are a from node 
and a to node. If a restriction starts with "no_" this is all we need,
but relation 2560683 is starting with "only_" .  These only-restrictions are 
internally converted to no-restrictions for all other roads connected to the 
via point. That means mkgmap uses the closest node on the excluded ways
as the "to" node. 
In the example, the restriction 2560683 is  a
"only_right_turn" from way 189568203 to way 189568204 via node 119659814.
The calculated from-node is node 119631435 in way 189568203 
(the connection in the north), and the to-node is the closest node on way 
189568204 (search is started from the via node,  so the result is node 119659791.
The only other way connected to the via node is way 13008519, and the next
node on this way (searching again from the via node) is node 119659791.
Now that's the problem: The resulting restriction would be a
"no_xxx_turn_to" with via-node 119659791 and a to-node 119659791,
and that makes no sense, so mkgmap drops it.

To solve the problem, mkgmap can add or change one point on way 13008519
to a node, so that it can store a restriction to that point. 
In the attached patch I've implemented an algo for this.
It is rather complicated, so another alternative would be to change way  13008519 
to a one-way road if this special case is detected, but that also seem difficult.

The patch fixes also a special case in the remove-short-arc routine which might
replace a point that was previously stored as the via node. 

Please let me know what you think about it.

Gerd

From: gpetermann_muenchen at hotmail.com
To: mkgmap-dev at lists.mkgmap.org.uk
Date: Sun, 15 Dec 2013 12:52:09 +0100
Subject: [mkgmap-dev] why is this restriction relation ignored?




Hi,

while debugging the I found this http://www.openstreetmap.org/relation/2560683


which seems to be ignored by mkgmap.
I guess the problem could be that both ways 
http://www.openstreetmap.org/way/189568203 and 
http://www.openstreetmap.org/way/189568204 
start at the via node?

Gerd
 		 	   		  

_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20131218/ef602c03/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: restrictons-v1.patch
Type: application/octet-stream
Size: 9047 bytes
Desc: not available
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20131218/ef602c03/attachment-0001.obj>


More information about the mkgmap-dev mailing list