<html>
<head>
</head>
<body class='hmmessage'><div dir='ltr'>

<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">Hi Michal,<br><br>okay, now I was able to reproduce it, don't know what I did wrong before,<br>the problem occurs also with the default style, typically for motorways<br>in the overview map.<br><br>This is what happens:<br>You have two ways with equal attributes like name, type etc.<br>Both ways share one or more points, but they are going in opposite <br>directions, but they share not all points.<br>The LineMergeFilter doesn't care about direction and merges the two lines.<br>This creates a line with a spike, <br>Simple case:<br>Line1 : a-&gt;b-&gt;c<br>Line2:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; b&lt;-c<br>Result after merge:&nbsp; a,b,c,b<br>The DouglasPeuckerFilter removes the spike between a and the last b <br>when the error is within the tolerance, so the remaining line is&nbsp; a-&gt;b instead<br>of a-&gt;c<br><br>In the worst case, a long way with an almost equal long spike is "simplified"<br>to a much shorter way.<br><br>In older releases this situation was handled by "preserving" the merge point<br>in LineMergeFilter, so that the DP filter did not make this error. <br>I removed that feature because the "preserved" flag was stored within the <br>point object and was used for all higher resolutions and also for all other<br>lines or shapes referencing that point. The effect is that the DP filter did<br>not work as well as possible.<br>Of course I did not think about the above problem :-(<br><br>I am not yet sure how to fix this problem. I guess I should <br>try to detect the spike before executing the DP filter, or <br>find a better variant of the preserved points,<br>or change LineMergeFilter to avoid merging lines<br>when that creates a spike. <br>Have to get some more sleep now...<br><br>Gerd<br><br><br><br><br><br><br><div><hr id="stopSpelling">Date: Sun, 23 Mar 2014 23:14:10 +0100<br>From: michal.rogala@gmail.com<br>To: mkgmap-dev@lists.mkgmap.org.uk<br>Subject: Re: [mkgmap-dev] dissapearing roads<br><br><div dir="ltr"><div><div><div><br></div>If you wan't to reproduce this bug, modify default style in that way:<br><br></div>1) Remove <br><br>highway=tertiary [0x05 road_class=1 road_speed=3 resolution 23]<br><br></div>

2) Replace it with:<br><div><br>highway=tertiary [0x05 resolution 20-20 continue]<br>highway=tertiary [0x05 resolution 21-21 continue]<br>highway=tertiary [0x05 resolution 22-22 continue]<br>highway=tertiary [0x05 road_class=1 road_speed=3 resolution 23]<br>

<br></div><div>Proof:<br><br><a href="http://imgur.com/j4EdLUd" target="_blank">http://imgur.com/j4EdLUd</a><br><a href="http://imgur.com/NaQvmKV" target="_blank">http://imgur.com/NaQvmKV</a><br><br><br>:)<br></div><div>
<br><br></div><div>best regards<br>
<br>Michal Rogala<br></div></div><div class="ecxgmail_extra"><br><br><div class="ecxgmail_quote">2014-03-23 22:03 GMT+01:00 Micha³ Rogala <span dir="ltr">&lt;<a href="mailto:michal.rogala@gmail.com" target="_blank">michal.rogala@gmail.com</a>&gt;</span>:<br>
<blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr"><div class="ecxgmail_extra"><div><br></div>2014-03-23 21:03 GMT+01:00 GerdP <span dir="ltr">&lt;<a href="mailto:gpetermann_muenchen@hotmail.com" target="_blank">gpetermann_muenchen@hotmail.com</a>&gt;</span>:<br>

<div class="ecxgmail_quote"><div><blockquote class="ecxgmail_quote" style="border-left:1px solid rgb(204,204,204);padding-left:1ex;">Hi Michal,<br>
<br>
You said that GPSMapEdit shows that the way is really missing. I saw lines<br>
with<br>
the types you use (0x1101b and 0x1101d), both with and without<br>
--preserve-element-order.<br></blockquote></div><div><br>Hi!<br><br></div><div>Here is part of Domaniewska street missing at Level 3:<br><br><a href="http://imgur.com/EhvRxqJ" target="_blank">http://imgur.com/EhvRxqJ</a><br>
<br></div><div>Selected&nbsp; (purple) roads are type 0x1101b. Missing part should also be 0x1101b<br>
</div><div><br></div><div>(best seen when you force level by pressing "3" on the keyboard in MapEdit).<br><br>best regards<br><br>Michal Rogala<br></div><div><br><br>&nbsp;</div></div></div></div>
</blockquote></div><br></div>
<br>_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</div></div>
                                               </div></body>
</html>