<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi WanMil,<br><br>that's great. I think the patch is not urgent. I'll wait for the merge and post a 2nd version then.<br><br>Gerd<br><br><div>> Date: Wed, 18 Dec 2013 18:01:30 +0100<br>> From: wmgcnfg@web.de<br>> To: mkgmap-dev@lists.mkgmap.org.uk<br>> Subject: Re: [mkgmap-dev] [Patch v1] some restrictions are ignored<br>> <br>> Hi Gerd,<br>> <br>> I plan to merge the mergeroad branch during the next week. It would be <br>> great if there are no more changes to the StyledConverter or if these <br>> changes are "easy" to merge :-) I cannot try your patch right now but <br>> maybe you can keep an eye on it?<br>> <br>> Thanks!<br>> WanMil<br>> <br>> > Hi all,<br>> ><br>> > okay, found the answer. The problem is this:<br>> > To store a restriction in the img file<br>> > we have to calculate three nodes (points which are connecting highways).<br>> > One is the via node (which is also specified in OSM, others are a from node<br>> > and a to node. If a restriction starts with "no_" this is all we need,<br>> > but relation 2560683 is starting with "only_" . These only-restrictions<br>> > are<br>> > internally converted to no-restrictions for all other roads connected to<br>> > the<br>> > via point. That means mkgmap uses the closest node on the excluded ways<br>> > as the "to" node.<br>> > In the example, the restriction 2560683 is a<br>> > "only_right_turn" from way 189568203 to way 189568204 via node 119659814.<br>> > The calculated from-node is node 119631435 in way 189568203<br>> > (the connection in the north), and the to-node is the closest node on way<br>> > 189568204 (search is started from the via node, so the result is node<br>> > 119659791.<br>> > The only other way connected to the via node is way 13008519, and the next<br>> > node on this way (searching again from the via node) is node 119659791.<br>> > Now that's the problem: The resulting restriction would be a<br>> > "no_xxx_turn_to" with via-node 119659791 and a to-node 119659791,<br>> > and that makes no sense, so mkgmap drops it.<br>> ><br>> > To solve the problem, mkgmap can add or change one point on way 13008519<br>> > to a node, so that it can store a restriction to that point.<br>> > In the attached patch I've implemented an algo for this.<br>> > It is rather complicated, so another alternative would be to change way<br>> > 13008519<br>> > to a one-way road if this special case is detected, but that also seem<br>> > difficult.<br>> ><br>> > The patch fixes also a special case in the remove-short-arc routine<br>> > which might<br>> > replace a point that was previously stored as the via node.<br>> ><br>> > Please let me know what you think about it.<br>> ><br>> > Gerd<br>> ><br>> > From: gpetermann_muenchen@hotmail.com<br>> > To: mkgmap-dev@lists.mkgmap.org.uk<br>> > Date: Sun, 15 Dec 2013 12:52:09 +0100<br>> > Subject: [mkgmap-dev] why is this restriction relation ignored?<br>> ><br>> > Hi,<br>> ><br>> > while debugging the I found this<br>> > http://www.openstreetmap.org/relation/2560683<br>> > which seems to be ignored by mkgmap.<br>> > I guess the problem could be that both ways<br>> > http://www.openstreetmap.org/way/189568203 and<br>> > http://www.openstreetmap.org/way/189568204<br>> > start at the via node?<br>> ><br>> > Gerd<br>> ><br>> > _______________________________________________ mkgmap-dev mailing list<br>> > mkgmap-dev@lists.mkgmap.org.uk<br>> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br>> ><br>> ><br>> > _______________________________________________<br>> > mkgmap-dev mailing list<br>> > mkgmap-dev@lists.mkgmap.org.uk<br>> > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br>> ><br>> <br>> _______________________________________________<br>> mkgmap-dev mailing list<br>> mkgmap-dev@lists.mkgmap.org.uk<br>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br></div>                                            </div></body>
</html>