logo separator

[mkgmap-dev] White stripes in the sea

From Marko Mäkelä marko.makela at iki.fi on Wed Jan 2 19:58:02 GMT 2013

On Wed, Jan 02, 2013 at 07:47:22PM +0100, WanMil wrote:
>I am quite sure you mixup generate-sea=polygons with 
>generate-sea=multipolygon.

Right, I am sorry about that. I have always used 
generate-sea=multipolygon (well, since March 2010).

>Of course the whole algorithm can be improved but I didn't find a 
>better solution which does not result in *very* *very* long 
>calculations.

Right. I guess that there could be some heuristics, with some reasonable 
threshold values so that the calculation time does not explode (and some 
artifacts will remain). An example: To cut out a group of islands from a 
multipolygon, split the outer polygon between the islands if the islands 
are close enough to each other. This would of course require some search 
index to be efficient. The proximity of the inner polygons could be 
computed based on a spatial index of some 'center of gravity' points, to 
save some memory. Once a pair of 'close' polygons is found, the nearest 
point of each polygon would be determined and the line would be cut 
between these nearest points.

>2. Better multipolygon cuts
>Instead of cutting the multipolygon by a complete vertical or 
>horizontal cut one could cut out a short corner.

Perhaps this could be combined with the above idea. But, I guess that 
some experiments would be needed to determine if the artefacts get 
better or worse with the more flexible cuts.

	Marko


More information about the mkgmap-dev mailing list