logo separator

[mkgmap-dev] Use both addr:city and admin_level as city for address search

From Lorenzo Mastrogiacomi lomastrolo at gmail.com on Sat May 12 14:00:56 BST 2018

Usually (in Italy) the municipality name is used as city in composing
the address but it often happens that within the municipality there are
other main towns which names are used instead.
I want this addresses to be searchable with both the municipality name
(admin_level=8) and the city name when it differs (tagged with
I use the default style with little modifications and added this rules
in the points file.

On top, first create a "fake" object only for searching, which will be
matched by default rules in address file, so these will have
admin_level8 as mkgmap:city.
	addr:city=* & 'addr:city'!='mkgmap:admin_level8'	[0x3200
continue with_actions]

Then set mkgmap:city with the addr:city value to have this as city for
the following matches.
	addr:city=* & 'addr:city'!='mkgmap:admin_level8'	{ set
mkgmap:city='${addr:city}' }

I also added modified the rule at the bottom to avoid "fake" objects to
get a name and show on the map.
	!(addr:city=* & 'addr:city'!='mkgmap:admin_level8' &
mkgmap:city!=*) &
	name=* { name '${name}' }

This seems to work pretty well but it looks rather complicated. I
wonder if there is a better way to do this. Any thoughts?

These are my options:
        --style-file=$style_reg \
        --latin1 \
        --country-name=Italia \
        --country-abbr="$abbr" \
        --region-name="$nome_reg" \
        --area-name="$nome_reg" \
        --family-name="OpenStreetMap: Mappe regionali ital.img" \
        --description="$nome_reg" \
        --series-name="$serie" \
        --precomp-sea=${MYPATH}/sea/ \
        --generate-sea \
        --bounds=${MYPATH}/bounds/ \
        --max-jobs \
        --route \
        --drive-on=detect,right \
        --process-destination \
        --process-exits \
        --location-autofill=is_in,nearest \
        --index \
        --split-name-index \
        --housenumbers \
        --add-pois-to-areas \
        --link-pois-to-ways \
        --preserve-element-order \
        --verbose \
        --name-tag-list=name,name:it,loc_name,reg_name,nat_name \
        --draw-priority=$priority \
        --reduce-point-density=3.2 \
        --make-opposite-cycleways \

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20180512/2fb1e9ad/attachment.html>

More information about the mkgmap-dev mailing list