Yes, this is good :) :
addr:city!=$mkgmap:admin_level8

Can I make this check case insensitive?



Lorenzo



Il giorno sab, 12/05/2018 alle 16.15 +0000, Gerd Petermann ha scritto:
> Hi Lorenzo,
> 
> the term 'addr:city'!='mkgmap:admin_level8'  is always true because you 
> compare two strings. Maybe you want to compare the values
> of the tags instead?
> 
> Gerd
> 
> ________________________________________
> Von: mkgmap-dev <[email protected]> im Auftrag von 
> Lorenzo Mastrogiacomi <[email protected]>
> Gesendet: Samstag, 12. Mai 2018 15:00:56
> An: [email protected]
> Betreff: [mkgmap-dev] Use both addr:city and admin_level as city for address  
>   search
> 
> 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 addr:city=*).
> 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 \
>         --gmapsupp
> 
> 
> Lorenzo
> _______________________________________________
> mkgmap-dev mailing list
> [email protected]
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> 
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to