
Hi WanMil,
Date: Sun, 6 May 2012 20:56:48 +0200 From: wmgcnfg@web.de To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] [Patch] Improve boundary splitting
Hi Gerd,
I decided not to include your patch. The improvement is done only for the precompilation step. So it affects only a very few people that precompile the boundaries. The patch itself adds another conversion step from Area to Shape format. In my point of view this is the breaking point where the source code will be no longer maintainable.
I used the Shape superclass because it allows to pass Area and Path2D parameters without conversion. In my eyes, Area should only be used when we need its methods like contains or intersect. It is very inefficient when you just want to store a closed way with double precision that is already known to be not self-intersecting.
Before adding some special algorithms to improve performance it is necessary to overwork the boundary related classes and give them a clean structure. The current structure is the result of implementing a totally new function of mkgmap and improving and changing it completely for performance reasons (with a great result!). Now once it's working there is the time for some restructuring.
Yes, that's true. The methods are spread over multiple files, and I had problems to decide where to put new methods. I guess you working on the restructuring to finish the precompiled-sea code?
Sorry for that! I hope you understand my reasons.
Yes, sure. I'll continue working on splitter now. Gerd
WanMil
Hi WanMil,
attached is a patch that uses an optimized implementation of the Sutherland-Hodgman algorithm
http://en.wikipedia.org/wiki/Sutherland-Hodgeman wikipedia
which is much faster than the area.intersect. It is only used to create the precompiled boundaries.
The improvements depend on the continent, for africa I see 130 secs with r2272 and 84 secs with the patched version. For asia, I see only a small improvement of ~ 10%
On my machine, the precompilation of the boundaries is now quite often waiting for the disk.
http://gis.19327.n5.nabble.com/file/n5670294/BoundarySplitter.patch BoundarySplitter.patch
Gerd
-- View this message in context: http://gis.19327.n5.nabble.com/Patch-Improve-boundary-splitting-tp5670294p56... 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