<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi Andrzej,<br><br>The apply tells mkgmap to add the tag area=yes to the members,<br>and I think that's what you want. Note that the members of the mp-relation<br>are not the members of the original OSM relation, they are the artifical ways. <br><br>You are right, it turned out that MultiPolygonRelation creates 4 different ways for relation<br>4764899. Three have the tag mkgmap:stylefilter=polygon and are<br>only passed through the polygons rules, one <br>is passed through the lines rules, it has the tag<br>mkgmap:stylefilter=polyline: <br><br>4611686018427387907 (4764899) - [highway=footway,mkgmap:stylefilter=polygon,mkgmap:cache_area_size=481.705810546875,mkgmap:mp_created=true] polygons<br>4611686018427387908 (4764899) - [highway=footway,mkgmap:stylefilter=polygon,mkgmap:cache_area_size=481.705810546875,mkgmap:mp_created=true] polygons<br>4611686018427387909 (4764899) - [highway=footway,mkgmap:stylefilter=polygon,mkgmap:cache_area_size=481.705810546875,mkgmap:mp_created=true] polygons<br>4611686018427387910 (4764899) - [mkgmap:stylefilter=polyline,highway=footway,mkgmap:mp_created=true] lines<br><br>The comment for the last one :<br> // Go through all original outer ways, create a copy, tag them<br> // with the mp tags and mark them only to be used for polyline processing<br> // This enables the style file to decide if the polygon information or<br> // the simple line information should be used.<br><br>I don't know why this is done, but it seems to be needed for something.<br>The code for this was added with r1694, long before I started to look at mkgmap.<br><br>Reg. highway=* and area=yes: I've also noticed that the default style ignores<br>some combinations. Please post a patch.<br><br>Gerd<br><br><br><div>Date: Sat, 9 May 2015 15:06:59 +0200<br>From: popej@poczta.onet.pl<br>To: mkgmap-dev@lists.mkgmap.org.uk<br>Subject: Re: [mkgmap-dev] problem with highways as multipolygons<br><br><pre>Hi Gerd,<br> <br> > I agree that it looks strange,<br> > but it works when you use apply like this:<br> > type=multipolygon & highway=* { apply { set area=yes; } }<br> <br>As I understand "apply" deals with relation's members, which aren't <br>highways at all. I have already tried "apply" but this is simply wrong <br>approach.<br> <br> > You may also ask for mkgmap:mp_created=true in the rules.<br> <br>Does it mean that polyline is created form multipolygon and nothing <br>else? I get about 600 objects in Poland which I would delete using this <br>rule. All looks like good candidates for removal. And probably I should <br>use complimentary rule in "polygons" file, to get proper support for <br>these objects. Looks good for temporary solution.<br> <br> > I can't reproduce that the lines rules are applied,<br> > with my test file that contains the complete relation<br> > only the polygon rules are used. I assume your input<br> > file contains only a part of the relation?<br> <br>See attached file with single relation. I get highway=footway as <br>polyline. Here result of echotags:<br> <br>relation with added "area=yes" in style:<br>4764899 - [highway=footway,area=yes,type=multipolygon]<br> <br>highway in "lines"<br>4611686018427387910 (4764899) - <br>[highway=footway,mkgmap:mp_created=true,mkgmap:stylefilter=polyline]<br> <br>Maybe you could create a new relation in <br>MultiPolygonRelation.processElements()? Relation could include all tags <br>form original relation and new polylines as members. This would allow <br>for some processing in style.<br> <br>Note: default style deals with "highway=pedestrian & area=yes", but <br>ignore "area" tag for most other types of highway. I think at least <br>footway and stairs should be checked for "area".<br> <br>-- <br>Best regards,<br>Andrzej<br></pre><br>_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</div>                                            </div></body>
</html>