Hi Andrzej,

The apply tells mkgmap to add the tag area=yes to the members,
and I think that's what you want. Note that the members of the mp-relation
are not the members of the original OSM relation, they are the artifical ways.

You are right, it turned out that MultiPolygonRelation creates 4 different ways for relation
4764899. Three have the tag  mkgmap:stylefilter=polygon and are
only passed through the polygons rules, one
is passed through the lines rules, it has the tag
mkgmap:stylefilter=polyline: 

4611686018427387907 (4764899) - [highway=footway,mkgmap:stylefilter=polygon,mkgmap:cache_area_size=481.705810546875,mkgmap:mp_created=true] polygons
4611686018427387908 (4764899) - [highway=footway,mkgmap:stylefilter=polygon,mkgmap:cache_area_size=481.705810546875,mkgmap:mp_created=true] polygons
4611686018427387909 (4764899) - [highway=footway,mkgmap:stylefilter=polygon,mkgmap:cache_area_size=481.705810546875,mkgmap:mp_created=true] polygons
4611686018427387910 (4764899) - [mkgmap:stylefilter=polyline,highway=footway,mkgmap:mp_created=true] lines

The comment for the last one :
        // Go through all original outer ways, create a copy, tag them
        // with the mp tags and mark them only to be used for polyline processing
        // This enables the style file to decide if the polygon information or
        // the simple line information should be used.

I don't know why this is done, but it seems to be needed for something.
The code for this was added with r1694, long before I started to look at mkgmap.

Reg. highway=* and area=yes: I've also noticed that the default style ignores
some combinations. Please post a patch.

Gerd


Date: Sat, 9 May 2015 15:06:59 +0200
From: popej@poczta.onet.pl
To: mkgmap-dev@lists.mkgmap.org.uk
Subject: Re: [mkgmap-dev] problem with highways as multipolygons

Hi Gerd,

> I agree that it looks strange,
> but it works when you use apply like this:
> type=multipolygon & highway=* { apply { set area=yes; } }

As I understand "apply" deals with relation's members, which aren't
highways at all. I have already tried "apply" but this is simply wrong
approach.

> You may also ask for mkgmap:mp_created=true in the rules.

Does it mean that polyline is created form multipolygon and nothing
else? I get about 600 objects in Poland which I would delete using this
rule. All looks like good candidates for removal. And probably I should
use complimentary rule in "polygons" file, to get proper support for
these objects. Looks good for temporary solution.

> I can't reproduce that the lines rules are applied,
> with my test file that contains the complete relation
> only the polygon rules are used. I assume your input
> file contains only a part of the relation?

See attached file with single relation. I get highway=footway as
polyline. Here result of echotags:

relation with added "area=yes" in style:
4764899 - [highway=footway,area=yes,type=multipolygon]

highway in "lines"
4611686018427387910 (4764899) -
[highway=footway,mkgmap:mp_created=true,mkgmap:stylefilter=polyline]

Maybe you could create a new relation in
MultiPolygonRelation.processElements()? Relation could include all tags
form original relation and new polylines as members. This would allow
for some processing in style.

Note: default style deals with "highway=pedestrian & area=yes", but
ignore "area" tag for most other types of highway. I think at least
footway and stairs should be checked for "area".

--
Best regards,
Andrzej

_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev