logo separator

[mkgmap-dev] White stripes in the sea

From WanMil wmgcnfg at web.de on Wed Jan 2 20:54:06 GMT 2013

> Hi WanMil,
>
>  > What you see is the result of the multipolygon algorithm that cuts the
>  > sea areas into distinct polygons to cut out the land area. The white
>  > stripes are the polygon lines. But there is no space between the
>  > polygons. So obviously that should not the problem. The problem is that
>  > Garmins draw algorithm seems to create the white lines.
>
> well, sorry, I meant the thin areas, not the white stripes between.
> These thin areas
> are likely to be thrown away when coordinates are rounded. I think
> this explains the white stripes that I see in the QLandkarte GT screenshot.

Ok, so you mean areas that are too thin are not drawn?
The mp algorithm tries to do as few cuts as possible. So it cuts at that 
horizontal or vertical line where it can cut the most inner polygons. It 
does not check if the cutting line is longer or not (because it doesn't 
know and it's hard to estimate without implementing your own cut algorithm).

As a first quick hack it would be possible to add a check if an area is 
too thin and to revert this cut. That leads to the question: Is there a 
definition for "too thin"?

>  >
>  > Once again: It does not make sense to improve the PrecompSeaGenerator
>  > because the main task it does is to calculate the multipolygons. And so
>  > the only thing that could be improved is the mp algorithm itself.
>  >
>
> yes, I agree. So I'll try to find a better mp algorithm.

All you have to do is to improve the
private List<Way> cutOutInnerPolygons(Way outerPolygon, List<Way> 
innerPolygons)
method in class MultipolygonRelation. Good luck!

WanMil

>
> Gerd
>



More information about the mkgmap-dev mailing list