<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body dir="auto">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi all,<br>
</p>
<p>Attached is 2nd version of the patch. <br>
</p>
<p>The improvements are a bit better, although I've removed one <br>
</p>
<p>change in <span>PolygonSplitterBase</span> which reduces the number of splits</p>
<p>in rare cases (e.g. when the map contains large sea areas).</p>
<p>I think this change is okay, but it is not related to the LinePreparer</p>
<p>and thus should be handled separately.<br>
</p>
<p><br>
</p>
<p>A new binary containing the attached patch(es) is here:</p>
<p><a id="LPlnk343413" href="http://files.mkgmap.org.uk/download/302/mkgmap.jar" class="OWAAutoLink">http://files.mkgmap.org.uk/download/302/mkgmap.jar</a></p>
<p><br>
</p>
<p>If I here no complains I'll commit both patch next wednesday.</p>
<p><br>
</p>
<p>Gerd<br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Alexandre Loss <alexandre.loss@gmail.com><br>
<b>Gesendet:</b> Samstag, 16. Juli 2016 19:43:23<br>
<b>An:</b> Development list for mkgmap<br>
<b>Betreff:</b> Re: [mkgmap-dev] [Patch v1] improve LinePreparer to reduce img size</font>
<div> </div>
</div>
<div>
<div>Great discovery Gerd!</div>
<div id="AppleMailSignature"><br>
<br>
Enviado do meu iPhone</div>
<div><br>
Em 16 de jul de 2016, às 14:28, Gerd Petermann <<a href="mailto:GPetermann_muenchen@hotmail.com">GPetermann_muenchen@hotmail.com</a>> escreveu:<br>
<br>
</div>
<blockquote type="cite">
<div>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi all,</p>
<p><br>
</p>
<p>during the last days I tried to find more about the way how mkgmap stores <br>
</p>
<p>polygons, esp. why we have some limits. While doing that I stumbled over an</p>
<p>old comment in LinePreparer.java:</p>
<p></p>
<div> // I don't care about getting the smallest possible file size so<br>
// err on the side of caution.<br>
</div>
<p></p>
<p>which made me curious because I do care ;-)</p>
<p><br>
</p>
<p>I found out that Garmin offers a "trick" in the delta encoding which allows <br>
</p>
<p>to reduce the needed bytes in some cases, the <span>imgformat-1.0.pdf</span></p>
<p>explains this in detail, search for "<span> only the sign bit is set </span>".</p>
<p>This "trick" helps esp. well when coastline polygons or rivers are stored.</p>
<p><br>
</p>
<p>I can explain this more detailed if somebody likes to know more,</p>
<p>for now I'd like to hear if the trick causes any problems, I did not find any</p>
<p>so far. <br>
</p>
<p>A binary with this and a slightly improved <span>overview_levels_v2.patch</span><br>
</p>
<p>can be found here:</p>
<p><a id="LPlnk252425" href="http://files.mkgmap.org.uk/download/301/mkgmap.jar" class="OWAAutoLink">http://files.mkgmap.org.uk/download/301/mkgmap.jar</a></p>
<p><br>
</p>
<p>Depending on the data a single tile with size ~5MB may be reduced by 50 - 500+kB.<br>
</p>
<p><br>
</p>
<p>Gerd<br>
</p>
</div>
</div>
</blockquote>
<blockquote type="cite">
<div><reduceImgSize_v1.patch></div>
</blockquote>
<blockquote type="cite">
<div><span>_______________________________________________</span><br>
<span>mkgmap-dev mailing list</span><br>
<span><a href="mailto:mkgmap-dev@lists.mkgmap.org.uk">mkgmap-dev@lists.mkgmap.org.uk</a></span><br>
<span><a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a></span></div>
</blockquote>
</div>
</body>
</html>