<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>I just found Path2D.append(Shape s, boolean connect) which seems to do the same<br>as the addToPath() method. The advantage compared to multiple Area.add() calls is that<br>each Area.add() call also tries and remove obsolete points and dangling edges.<br>The more edges an Area has, the more time is wasted with this.<br><br>The trick can probably also be used in all MultipolygonRelation classes. Working on a patch...<br><br>Gerd<br><br><div>> Date: Thu, 23 Jan 2014 13:00:37 +0100<br>> From: wmgcnfg@web.de<br>> To: mkgmap-dev@lists.mkgmap.org.uk<br>> Subject: Re: [mkgmap-dev] Commit: r2971: Avoid precalculation of area size for sea polygons        created by the SeaGenerator.<br>> <br>> Hi Gerd,<br>> <br>> thanks for the hint. It's fixed now.<br>> <br>> I have no time to test your patch now but it sounds good :-)<br>> <br>> WanMil<br>> <br>> <br>> > Hi WanMil,<br>> ><br>> > this doesn't seem to work. I still see the tag in the precompiled<br>> > sea data:<br>> ><br>> >                 <tag k="natural" v="sea"/><br>> >                 <tag k="mkgmap:cache_area_size" v="1048709826.5"/><br>> ><br>> > I don't fully understand the idea. The current implementation seems to<br>> > calculate the value when precompiling and avoids recalculation when reading<br>> > the precompiled data.<br>> ><br>> > Gerd<br>> > P.S. I found some nice performance improvements for the precompSeaMerger.<br>> > Reduced run time from 2200 sec to ~330sec.<br>> > The most important change is to use BoundaryUtil.addToPath() instead of<br>> > Area.add().<br>> > See attached patch for the high-prec-branch.<br>> > I'll probably move the code for addToPath() from BoundaryUtil to<br>> > Java2DConverter.<br>> > PrecompSeaMerger.java.patch<br>> > <http://gis.19327.n5.nabble.com/file/n5794046/PrecompSeaMerger.java.patch><br>> ><br>> ><br>> > svn commit wrote<br>> >> Version mkgmap-r2971 was committed by wanmil on Thu, 16 Jan 2014<br>> >><br>> >> Avoid precalculation of area size for sea polygons created by the<br>> >> SeaGenerator.<br>> >><br>> >> For all sea polygons the area size was added as tag which increases the<br>> >> file size of the sea tiles but does not really help. The size only<br>> >> calculated the size of the sea in one sea tile and it's a bit random where<br>> >> the borders of a sea tile are. So the area size is not usefull.<br>> >> _______________________________________________<br>> >> mkgmap-dev mailing list<br>> ><br>> >> mkgmap-dev@.org<br>> ><br>> >> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br>> ><br>> ><br>> ><br>> ><br>> ><br>> > --<br>> > View this message in context: http://gis.19327.n5.nabble.com/Commit-r2971-Avoid-precalculation-of-area-size-for-sea-polygons-created-by-the-SeaGenerator-tp5793369p5794046.html<br>> > Sent from the Mkgmap Development mailing list archive at Nabble.com.<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>