administrative borders (was: multipolygon with outer polygon within inner polygons)

Hi all, It looks like I managed a way to render those complex multipolygon administrative borders correctly now. In the relation style file, I changed administrative borders statements like this: # country borders (type=boundary | type=multipolygon) & boundary=administrative & admin_level=2 { apply { set boundary2=yes; set mkgmap:boundary2_name='$(mkgmap:boundary2_name)/${name}' | '${name}'; } } For my map of the Netherlands, I'm only interested in admin levels 2,4 and 8 (country/province/municipality) so I copied those lines for provinces (set boundary4=yes for the lines and boundary4_name for the names) and municipalities (set boundary8=yes and boundary8_name) too. I'm not sure if mkgmap: has any function, maybe without this it will function as well? In the line style file, I removed all the statements regarding to the admin. borders and replaced it with these lines: boundary2=yes { name '${mkgmap:boundary2_name}' } [0x1e resolution 16] boundary4=yes { name '${mkgmap:boundary4_name}' } [0x1d resolution 18] boundary8=yes { name '${mkgmap:boundary8_name}' } [0x1c resolution 20] I tested it with the complicated area, and it seems rendering fine now :-)

On Feb 14, 2010, at 11:32, Minko wrote:
set mkgmap:boundary2_name='$(mkgmap:boundary2_name)/${name}' | '${name}';
Just out of interest, should the parentheses surrounding mkgmap:boundary2_name not be curly brackets ('{', '}')? I noticed this in the default style as well. Or is this a syntax which I am unfamiliar with? Cheers.

Hi Clinton,
On Feb 14, 2010, at 11:32, Minko wrote:
set mkgmap:boundary2_name='$(mkgmap:boundary2_name)/${name}' | '${name}';
Just out of interest, should the parentheses surrounding mkgmap:boundary2_name not be curly brackets ('{', '}')? I noticed this in the default style as well. Or is this a syntax which I am unfamiliar with?
It is a syntax that I implemented some time ago. Previously, the apply action of relations would only refer to the relation members, not the relation itself. The default style generates administrative boundary names such as Suburb/City/Province/Country, sadly in arbitrary order. It would be nice to sort the relations in some way before applying the attributes. The same would be useful for bus route relations as well, e.g., have the route refs on bus stops in numeric order. Best regards, Marko

Yes, now you metion it, I notice that too. If I change the ( ..... ) for { ..... } which seems more logical, it will give not the display at the borders that I want. At the National Border between Netherlands and Belgium for instance, now only Belgium is displayed instead of the desired two names. So I better leave it like in the default style. Clinton Gladstone wrote: Sun, 14 Feb 2010 04:50:22 -0800 On Feb 14, 2010, at 11:32, Minko wrote:
set mkgmap:boundary2_name='$(mkgmap:boundary2_name)/${name}' | '${name}';
Just out of interest, should the parentheses surrounding mkgmap:boundary2_name not be curly brackets ('{', '}')? I noticed this in the default style as well. Or is this a syntax which I am unfamiliar with?
participants (3)
-
Clinton Gladstone
-
Marko Mäkelä
-
Minko