Multipolygons code rewritten (1st try)

Hi, I have rewritten the MultiPoloygonRelation class regarding the algorithm described in http://wiki.openstreetmap.org/wiki/Relation:multipolygon/Algorithm. This is a first (very early and not very well tested) implementation of this algorithm. I don't have time to go on with it within the next days. Multipolygons are a big discussion in the mailing list at the moment so maybe someone likes to review the code and gives some helpful comments on it. (Any comment is very welcome!!) These are the open points: * Tagged inner polygons are not considered yet! This a big open point which must be implemented next. (Some comments point to the place where to do this) * The code currently does not remove any inner or outer polygon segment. This must be changed in future. But at the moment I have no solution how to decide which segment should be removed and which segment must remain for map generation. (To be honest I did not think about it for long ;-) * The inner and outer tags in the polygon are not used at the moment. This must also be changed. * The code is completely unoptimized. It's just an early study if this can improve the multipolygon code. I am happy about any improvements! * The old insertPoints method does not consider the direction of the polygons. This can result in self intersecting polygons. I don't know if that matters but it can easily be improved. I am happy if someone can explain me if that matters than I can implement a fix (hopefully :-). * I don't know if my synthetic ids are generated well. I think there should be one synthetic generator for whole mkgmap? Have a happy new year (with the multipolygons case fixed :-))) WanMil

On 29/12/09 21:11, WanMil wrote:
I have rewritten the MultiPoloygonRelation class regarding the algorithm described in http://wiki.openstreetmap.org/wiki/Relation:multipolygon/Algorithm.
Hi, Thanks for this patch. I've checked it into a branch called "mp" and so a pre-compiled jar file will appear on the download page http://www.mkgmap.org.uk/snapshots/ (eg mkgmap-mp-r1447.jar) so that people can easily try it out. Regards, ..Steve

On 30.12.2009 15:43, Steve Ratcliffe wrote:
On 29/12/09 21:11, WanMil wrote:
I have rewritten the MultiPoloygonRelation class regarding the algorithm described in http://wiki.openstreetmap.org/wiki/Relation:multipolygon/Algorithm.
Hi, Thanks for this patch. I've checked it into a branch called "mp" and so a pre-compiled jar file will appear on the download page http://www.mkgmap.org.uk/snapshots/ (eg mkgmap-mp-r1447.jar) so that people can easily try it out.
Regards,
..Steve _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
I just tried out the above patch against rev xx51. It does solve the problem of ways not displaying on multipolygon=outer (like the "other" patch v2 does) but also did not add some bizarre boundary lines that otherwise span some tiles. On the other hand I could not find any place where polygon ares were rendered differently. Many places correctly rendered with mapnik/osmarender (like the large multipolygon forest (inside a relation) East of Vienna is still not correctly rendered).
participants (3)
-
Felix Hartmann
-
Steve Ratcliffe
-
WanMil