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