[mkgmap-dev] [Patch v1] some restrictions are ignoredFrom Gerd Petermann gpetermann_muenchen at hotmail.com on Wed Dec 18 19:15:17 GMT 2013
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 at web.de > To: mkgmap-dev at 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 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 > > > > > > _______________________________________________ > > mkgmap-dev mailing list > > mkgmap-dev at lists.mkgmap.org.uk > > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > > > > _______________________________________________ > 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/b2839d40/attachment.html>
- Previous message: [mkgmap-dev] [Patch v1] some restrictions are ignored
- Next message: [mkgmap-dev] Commit: r2883: Store CoordNode instead of nodeid in IdentityHashMap.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list