logo separator

[mkgmap-dev] Multipolygon artificial tagging

From Torsten Leistikow de_muur at gmx.de on Sun Feb 21 19:00:56 GMT 2010

Moin,

I tried a slightly modified patch provided by WanMil, where also mkgmap:mp_*=no
tags are added:

> the patch for the mp code does not remove any tags from the source
> polygons and lines. Instead it tags all mp-source lines and polygons
> with mkgmap:mp_source=yes and mkgmap:mp_created=no.
> 
> All artificially created polygons during the mp processing are tagged
> with mkgmap:mp_created=yes and mkgmap:mp_source=no.
> 
> Example:
> Polygon A - natural=water, role=outer
> Polygon B - landuse=grass, role=inner
> 
> Result after mp processing
> Polygon A - natural=water, role=outer, mkgmap:mp_source=yes
> Polygon B - landuse=grass, role=inner, mkgmap:mp_source=yes
> 
> Polygon A1 - natural=water, mkgmap:mp_created=yes
> Polygon A2 - natural=water, mkgmap:mp_created=yes
> Polygon B1 - landuse=grass, mkgmap:mp_created=yes

With this patch I was able to fix the multipolygon borders commonly used in
Germany, by modifying my style as follows.

For the border lines I don't want to have the artificially created polygons, I
am only interested in the original polygons from the multi-polygon. So I added
to each border check the condition mkgmap:mp_created!=yes. As a result only the
original polygons from a multi-polygon are drawn as borderlines as well as all
lines not belonging to a multi-polygon.

The second change was done in the polygon files. Here I added to every check the
condition mkgmap:mp_created!=no. As a result only the artificially created
polygons are drawn as areas as well as all polygons not belonging to a
multi-polygon.

So in my eyes with this patch the multi-polygon processing is much better
controllable via the style file. But you have to adjust your style accordingly,
so that you do not output both polygons, the original and the artificial one.

Gruss
Torsten



More information about the mkgmap-dev mailing list