
Hi WanMil, that's great. I think the patch is not urgent. I'll wait for the merge and post a 2nd version then. Gerd
Date: Wed, 18 Dec 2013 18:01:30 +0100 From: wmgcnfg@web.de To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] [Patch v1] some restrictions are ignored
Hi Gerd,
I plan to merge the mergeroad branch during the next week. It would be great if there are no more changes to the StyledConverter or if these changes are "easy" to merge :-) I cannot try your patch right now but maybe you can keep an eye on it?
Thanks! WanMil
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@hotmail.com To: mkgmap-dev@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@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev