Re: [mkgmap-dev] multipolygons: how to flag role=inner role=outer in Style file?

Thanks Marko, The tag natural=water is not assigned to the relation (only type=multipolygon) so this is not working. Is it possible to write a condition for role=outer & natural=water { apply role=inner { set natural=land } } ?? Here another example of that kind of relation: http://maps.google.de/maps?f=q&hl=de&geocode=&q=http://betaplace.emaitie.de/... The red way (island) is flooded in my map (and other osm maps as well). What I noticed is that on other maps (radfahrer, openmtb) which were made with previous versions of mkgmap those islands were not flooded, but now they are. So it was somehow possible, but how? Regards, Minko Marko Mäkelä wrote: 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

Well then just put natural=water & role=inner [0x.. type from land instead of water). natural=water [0x type of water] Previous versions were often incorrect when it came to multipolygons. which openmtbmap version worked last? (because current version to mkgmap svn no relevant mp changes were done). On 27.02.2010 20:22, Minko wrote:
Thanks Marko,
The tag natural=water is not assigned to the relation (only type=multipolygon) so this is not working.
Is it possible to write a condition for role=outer& natural=water { apply role=inner { set natural=land } } ??
Here another example of that kind of relation: http://maps.google.de/maps?f=q&hl=de&geocode=&q=http://betaplace.emaitie.de/...
The red way (island) is flooded in my map (and other osm maps as well).
What I noticed is that on other maps (radfahrer, openmtb) which were made with previous versions of mkgmap those islands were not flooded, but now they are. So it was somehow possible, but how?
Regards, Minko
Marko Mäkelä wrote:
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 _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

27.02.2010 22.10.33, Felix Hartmann wrote:
Well then just put natural=water & role=inner [0x.. type from land instead of water). natural=water [0x type of water]
How would that work? Wouldn't you have to set role=inner on the inner way (island) in the relations rules? What if the island contains lakes? Then, the island way would be in role=inner in the lake-with-island multipolygon and role=outer in the island-with-lake multipolygon. I think that the style language for relations should be improved. Marko

Hi Minko,
The tag natural=water is not assigned to the relation (only type=multipolygon) so this is not working.
Is it possible to write a condition for role=outer & natural=water { apply role=inner { set natural=land } } ??
As I wrote in my initial reply, my understanding is the only currently available conditions to apply are role=string (not even role~regexp) and the attributes of the relation. You cannot restrict apply based on member type (node, way, relation) or attributes. It would be useful to have that. I would also like to be able to sort relations before apply, so that name or ref can be appended in a sensible order (administrative boundaries, multiple routes sharing the same way or bus stops, etc.) Marko
participants (3)
-
Felix Hartmann
-
Marko Mäkelä
-
Minko