<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hello everybody!</div>
<div> </div>
<div>From time to time I use mkgmap for producing Garmin maps for myself. Recently I needed to have a possibility for an entity to get the name of the place where the entity resides, just like it's the case with boundaries and admin levels.</div>
<div>The purpose for me was to have easier address search and displaying in Russia where we have one particular region type with admin_level=6, that is named "городской округ" (city district). It's often the case that it contains only one city but the cities themselves are not being mapped as admin_level=x. So in my style, to fill mkgmap:city in these cases, I only can use the value of mkgmap:admin_leve6. But that official name can be quite long and unhandy, and the "normal" name of the city cannot be figured out automatically.</div>
<div> </div>
<div>For example:</div>
<div>городской округ Жуковский => Жуковский</div>
<div>Челябинский городской округ => Челябинск</div>
<div>Зиминское городское муниципальное образование => Зима</div>
<div> </div>
<div>Somehow I overlooked WanMil's message from 2013 (http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2013q2/018003.html) and so I did the change myself in a local branch. Now I can write in my address style include something like this:</div>
<div> </div>
<div># Russia<br/>
mkgmap:country=RUS & mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8}' }<br/>
mkgmap:country=RUS & mkgmap:city!=* & (mkgmap:place=city | mkgmap:place=town) { set mkgmap:city='${mkgmap:place_name}' }<br/>
mkgmap:country=RUS & mkgmap:city!=* & mkgmap:admin_level6=* { set mkgmap:city='${mkgmap:admin_level6}' }</div>
<div> </div>
<div>and get the proper city name in my map. Of course, to get this working, I had to create my own set of precompiled bounds with additional rule "type=multipolygon and place= and name=" for osmfilter and a run of BoundaryPreprocessor to set the variables mkgmap:place (attribute 'place' from the multipolygon) and mkgmap:place_name (attribute 'name' from the multipolygon).</div>
<div> </div>
<div>I don't know if it's a highly desirable feature, but probably someone else will find it useful and it could be added to a new release of mkgmap.</div>
<div> </div>
<div>Cheers!</div>
<div>Max</div></div></body></html>