[mkgmap-dev] Still problems with remove-short-arcs
From Gerd Petermann gpetermann_muenchen at hotmail.com on Thu Oct 31 08:30:28 GMT 2013
Hi Carlos, yes, I also did not find many cases where this problem occurs. So I tested it also by doing the opposite: Setting bad values for a nice roundabout. Such a roundabout was no longer used by MapSource. I did not yet try to find the critical value. The problem also occurs on normal primary roads. Attached is test data that shows the problem. When routing from r4 to r3 (or vice versa), MapSource choses the longer road r2 instead of r1 because in r1, there is a sharp angle caused by rounding errors near the crossing (angle.png). The white lines show the ways mkgmap is using after rounding. If you move the left point a little bit down so that it is rounded to the same Garmin latitude value, MapSource choses r1 again. Again, the problem is not caused by the length of an arc, but rounding errors. It is just more likely to happen because you normally will not add a point close to another. I'll try to find a fix for this case as well. Gerd > Date: Wed, 30 Oct 2013 19:01:15 +0100 > From: cdavilam at orangecorreo.es > To: mkgmap-dev at lists.mkgmap.org.uk > Subject: Re: [mkgmap-dev] Still problems with remove-short-arcs > > It fixes the routing problem for the reported roundabout, well done. I > don't have any other test cases at this moment to test it further though. > Carlos > > El 30/10/13 17:39, GerdP escribió: > > Hi all, > > > > attached is a patch that detects "wrong" angles in roundabouts and > > overwrites them with reasonable values. > > The typical angle in a roundabout is ~210°, it seems that Garmin > > likes values between 180° and 240°, and refuses to use other > > angles, at least on primary roads. > > > > Compiled binary based on trunk r2794 is here: > > http://files.mkgmap.org.uk/download/160/mkgmap.jar > > > > tweezeRoundaboutArcs_v1.patch > > <http://gis.19327.n5.nabble.com/file/n5783403/tweezeRoundaboutArcs_v1.patch> > > > > Note that this patch doesn't change the rendering data, > > so ugly roundabouts will still look the same. > > The corresponding patch is work in progress. > > > > Gerd > > > > > > > > GerdP wrote > >> Hi Carlos, > >> > >> just to clarify: You say that remove-short-arcs=0 introduces the sharp > >> angle. > >> This is not true, as remove-short-arcs=0 will not move anything. In fact, > >> the sharp angle is caused by the rounding to Garmin map units. > >> The green line in the screen shot shows the line that is used after > >> rounding. You see that the rounding introduces an angle of ca. 75°. > >> So why does rsa=3 help? Because it flatens the angle as it removes > >> one point. You can get the same effect if you move one of the node > >> 975733410 a little bit. > >> The problem disappears when I add a few lines in the code to make to sure > >> that the calculated bearings are closer to reality (means I overwrite the > >> values). > >> I thought that the check-roundabout or adjust-turn-headings options were > >> meant to do that, but they don't seem to help. > >> I think the reason is that adjust-turn-headings doesn't treat roundabouts > >> special. > >> I see two possible solutions when > >> we detect the situation that the rounding has created an angle which is > >> too sharp > >> to be reasonable in a roundabout: > >> 1) Overwrite the calculated heading values > >> 2) Try to find the point that was probably rounded wrong, and change its > >> coordinates. This would have to be done much earlier in the chain. > >> > >> Both will fix routing , but only 2) will help regarding the ugliness > >> of the displayed roundabout. I try to code option 2), maybe both are > >> needed because some roundabouts in OSM are divided into small > >> fragments. > >> > >> Gerd > >> > >> Date: Sun, 27 Oct 2013 19:09:43 +0100 > >> From: > >> cdavilam@ > >> To: > >> mkgmap-dev at .org > >> Subject: [mkgmap-dev] Still problems with remove-short-arcs > >> > >> I still get some wrong routing at some roundabouts using > >> remove-short-arcs=0. See attached screenshots. > >> At http://osm.org/go/b_YMZ7sDP-- MapSource makes a detour to avoid the > >> roundabout, due to a sharp angle that is introduced by > >> remove-short-arcs=0. If I use rsa=3, the route goes through the > >> roundabout, but the exit number is wrong, because the incoming road and > >> the first street are joined at the same node of the roundabout. > >> > >> _______________________________________________ > >> mkgmap-dev mailing list > >> mkgmap-dev at .org > >> http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > >> _______________________________________________ > >> mkgmap-dev mailing list > >> mkgmap-dev at .org > >> http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > >> > >> carlos.png (151K) > >> <http://gis.19327.n5.nabble.com/attachment/5783138/0/carlos.png> > > > > > > > > > > -- > > View this message in context: http://gis.19327.n5.nabble.com/Still-problems-with-remove-short-arcs-tp5783089p5783403.html > > Sent from the Mkgmap Development mailing list archive at Nabble.com. > > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk > http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20131031/43c358df/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: angle.osm Type: application/octet-stream Size: 5644 bytes Desc: not available URL: <http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20131031/43c358df/attachment-0002.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: angle.gdb Type: application/octet-stream Size: 1371 bytes Desc: not available URL: <http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20131031/43c358df/attachment-0003.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: angle.png Type: image/png Size: 88253 bytes Desc: not available URL: <http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20131031/43c358df/attachment-0001.png>
- Previous message: [mkgmap-dev] Still problems with remove-short-arcs
- Next message: [mkgmap-dev] [PATCH v1] finalizer style file
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list