multipolygons: how to flag role=inner role=outer in Style file?

Hi, I have problems rendering this kind of relation: http://www.openstreetmap.org/browse/relation/1525 Many lakes in the Netherlands are automatically tagged (AND import) like this. The lake is a multipolygon, where the outer border is tagged as natural=water (role=outer) and the inner border (for instance an island in this lake) as natural=water (role=inner) too. When I render this, the islands in those lakes are flooded. Of course it would be better not to tag those inner borders at all, or use landuse=* or natural=land Is there a method in the style file to flag ways with role=outer and role=inner from the same multipolygon? What I would like to do is something like this:
From lake A with type=multipolygon and way A1 {natural=water & role=outer} and way A2 {natural=water & role=inner} remove the tag natural=water from way A2 (or retag natural=water to natural=land?)
Is this possible? Cheers, Minko

Hi Minko,
Is there a method in the style file to flag ways with role=outer and role=inner from the same multipolygon?
Yes, the relations file can match on role. I have never tried writing relations rules for multipolygons, though.
What I would like to do is something like this:
From lake A with type=multipolygon and way A1 {natural=water & role=outer} and way A2 {natural=water & role=inner} remove the tag natural=water from way A2 (or retag natural=water to natural=land?)
Is this possible?
Something like this (not tested) in the relations file of your style should do the trick: type=multipolygon & natural=water { apply role=inner { set natural=land } } This will assign natural=land to each inner member of multipolygon relations. As far as I understand, it is not possible to write other conditions for the apply than role. And you cannot match role by regular expression. In this case, you cannot add a condition that you only want to set natural=land for those inner members that had natural=water. I do not know when the custom multipolygon processing kicks in. It could be that the style rules are executed after that, and it is too late to adjust anything with style rules. Best regards, Marko
participants (2)
-
Marko Mäkelä
-
Minko