logo separator

[mkgmap-dev] Provincial capitals

From Bernhard Hiller bhil at gmx.de on Mon Sep 30 17:09:06 BST 2013

In case someone else is interested in the solution:
in the relations file, I added:

boundary=administrative & admin_level=* {
     apply role=admin_centre { set is_province_capital='${admin_level}'; }
}

And then in the points file:
...
place=city & population > 199999 & cityxx!=yes {set cityxx=yes} [0x0500 
level 4 continue with_actions ]
place=* & is_province_capital<5 & cityxx!=yes {set cityxx=yes} [0x0500 
level 4 continue with_actions ]
place=city & population >  99999 & cityxx!=yes {set cityxx=yes} [0x0600 
level 3 continue with_actions ]
place=* & is_province_capital<6 & cityxx!=yes {set cityxx=yes} [0x0600 
level 3 continue with_actions ]
place=city & population >  49999 & cityxx!=yes {set cityxx=yes} [0x0700 
level 3 continue with_actions ]
place=* & is_province_capital=* & cityxx!=yes {set cityxx=yes} [0x0700 
level 4 continue with_actions ]
place=city & population >   9999 & cityxx!=yes {set cityxx=yes} [0x0800 
level 3 continue with_actions ]
...

Am 29.09.2013 10:53, schrieb Bernhard Hiller:
> How can provincial capitals be detected by a style rule? I want to 
> show them at low zoom level, even if their population is rather little.
>
> Example:
> Phangnga town (South Thailand) has a population of some 10,000 people, 
> but it is the capital of Phangnga province (see 
> http://www.openstreetmap.org/browse/node/984029824). There is a 
> relation for the province boundary: 
> http://www.openstreetmap.org/browse/relation/1908799 which has 
> Phangnga set as its admin_centre; admin_level = 4.
>
> I tried in the points file:
>
> place=* & mkgmap:admin_level4=* & cityxx!=yes {set cityxx=yes} [0x0100 
> level 6 continue with_actions ]
>
> but that does not help: Phangnga city is shown at a high zoom level 
> only, instead of at the same zoom level with Bangkok (ok, that's not 
> useful, I do so temporarily to find out how things work).
> I tried place=city or place=village instead of place=*, same result.
>
> Only
>
> place=* & is_capital=province & cityxx!=yes {set cityxx=yes} [0x0100 
> level 6 continue with_actions ]
>
> works as expected. Fortunately, a mapper added the is_capital tag to 
> all Thai province capitals just a few days ago...
>
> But I think using the relation is a better option. Only: how can I do 
> that?
>
> Tried that with:
> mkgmap 2724, Java 7 u40 (64bit), Windows 7 (64bit)
>
> Thanks for your hints.
>



More information about the mkgmap-dev mailing list