logo separator

[mkgmap-dev] Configurable flood blocker

From WanMil wmgcnfg at web.de on Sun Dec 19 17:17:13 GMT 2010

>> Felix,
>> there is nothing to check. The flood blocker works only in
>> multipolygon mode. It is not possible to implement that for the
>> polygon mode.
>> Where do you think is the advantage of the polygon mode?
>> WanMil
> The advantage is:
> a) Speed (if you use --transparent and then gmt to set the transparency
> to no) you can have for land one polygon (only land area) for sea one
> polygon (only sea area) and NO background polygon.
> b) overlapping maps - using --transparent there is less chance that a
> land polygon from one map, overlaps sea from another map (on GPS as only
> there can be several maps active at the same time).
> --- in principal there is no speed advantage - but only as long as one
> does not attribute a color to 0x4b, however as one colors the
> background/land to be say white, it is much quicker to have white land
> background only, otherwise the GPS has to read much more data, and on
> older generation GPS when panning the map, there is a notable speed
> difference on top of flahing up background color, until it is overdrawn
> by the real landuse/natural/... polygon.

I don't want to put into question your final observation (polygon 
renders quicker on GPS device) but I cannot follow your arguments. Let's 
try to sort it out. Please correct me at any point if I am wrong.

I have added a picture for both sea generation methods. It shows the 
resulting tile and all polygons contained in the tile.

* First of all the new mp code in the coast branch generates land 
polygons. This is a new feature. So land+sea polygons=tile.
* The polygon code creates one sea polygon covering the whole tile and 
adds all land polygons. The style implementor must ensure that land is 
drawn over sea. Otherwise the tile is flooded.
* For tiles that don't contain any see one land polygon covering the 
whole tile is created (both for polygon and multipolygon processing).

=> a): For both variants you don't need a background polygon. The whole 
tile is covered by sea or land.
=> b): I don't understand where there should be the difference between 
polygon and multipolygon processing.
=> in principal: Do you mean that you don't want to paint land polygons 
but instead the background polygon? Ok, but in this case you can ignore 
the land polygon in the multipolgon variant but not in the polygon 
variant. Otherwise the background is painted and after that the sea is 
painted over it and you get flooded tiles. So you need to color the land 

The multipolygon processing generates much more complex polygons. I 
think that's the reason why it is rendered more slowly on GPS devices.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: seagen_modes.svg
Type: image/svg+xml
Size: 10601 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20101219/688c6d00/attachment.bin 

More information about the mkgmap-dev mailing list