<html><head></head><body><div>Yes, this is good :) :</div><div>addr:city!=$mkgmap:admin_level8</div><div><br></div><div>Can I make this check case insensitive?</div><div><br></div><div><br></div><div><br></div><div>Lorenzo</div><div><br></div><div><br></div><div><br></div><div>Il giorno sab, 12/05/2018 alle 16.15 +0000, Gerd Petermann ha scritto:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><pre>Hi Lorenzo,</pre><pre><br></pre><pre>the term 'addr:city'!='mkgmap:admin_level8'  is always true because you compare two strings. Maybe you want to compare the values</pre><pre>of the tags instead?</pre><pre><br></pre><pre>Gerd</pre><pre><br></pre><pre>________________________________________</pre><pre>Von: mkgmap-dev <<a href="mailto:mkgmap-dev-bounces@lists.mkgmap.org.uk">mkgmap-dev-bounces@lists.mkgmap.org.uk</a>> im Auftrag von Lorenzo Mastrogiacomi <<a href="mailto:lomastrolo@gmail.com">lomastrolo@gmail.com</a>></pre><pre>Gesendet: Samstag, 12. Mai 2018 15:00:56</pre><pre>An: <a href="mailto:mkgmap-dev@lists.mkgmap.org.uk">mkgmap-dev@lists.mkgmap.org.uk</a></pre><pre>Betreff: [mkgmap-dev] Use both addr:city and admin_level as city for address    search</pre><pre><br></pre><pre>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.</pre><pre>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=*).</pre><pre>I use the default style with little modifications and added this rules in the points file.</pre><pre><br></pre><pre>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.</pre><pre>addr:city=* & 'addr:city'!='mkgmap:admin_level8' [0x3200 continue with_actions]</pre><pre><br></pre><pre>Then set mkgmap:city with the addr:city value to have this as city for the following matches.</pre><pre>addr:city=* & 'addr:city'!='mkgmap:admin_level8' { set mkgmap:city='${addr:city}' }</pre><pre><br></pre><pre>I also added modified the rule at the bottom to avoid "fake" objects to get a name and show on the map.</pre><pre>!(addr:city=* & 'addr:city'!='mkgmap:admin_level8' & mkgmap:city!=*) &</pre><pre>name=* { name '${name}' }</pre><pre><br></pre><pre><br></pre><pre><br></pre><pre>This seems to work pretty well but it looks rather complicated. I wonder if there is a better way to do this. Any thoughts?</pre><pre><br></pre><pre>These are my options:</pre><pre>        --style-file=$style_reg \</pre><pre>        --latin1 \</pre><pre>        --country-name=Italia \</pre><pre>        --country-abbr="$abbr" \</pre><pre>        --region-name="$nome_reg" \</pre><pre>        --area-name="$nome_reg" \</pre><pre>        --family-name="OpenStreetMap: Mappe regionali ital.img" \</pre><pre>        --description="$nome_reg" \</pre><pre>        --series-name="$serie" \</pre><pre>        --precomp-sea=${MYPATH}/sea/ \</pre><pre>        --generate-sea \</pre><pre>        --bounds=${MYPATH}/bounds/ \</pre><pre>        --max-jobs \</pre><pre>        --route \</pre><pre>        --drive-on=detect,right \</pre><pre>        --process-destination \</pre><pre>        --process-exits \</pre><pre>        --location-autofill=is_in,nearest \</pre><pre>        --index \</pre><pre>        --split-name-index \</pre><pre>        --housenumbers \</pre><pre>        --add-pois-to-areas \</pre><pre>        --link-pois-to-ways \</pre><pre>        --preserve-element-order \</pre><pre>        --verbose \</pre><pre>        --name-tag-list=name,name:it,loc_name,reg_name,nat_name \</pre><pre>        --draw-priority=$priority \</pre><pre>        --reduce-point-density=3.2 \</pre><pre>        --make-opposite-cycleways \</pre><pre>        --gmapsupp</pre><pre><br></pre><pre><br></pre><pre>Lorenzo</pre><pre>_______________________________________________</pre><pre>mkgmap-dev mailing list</pre><pre><a href="mailto:mkgmap-dev@lists.mkgmap.org.uk">mkgmap-dev@lists.mkgmap.org.uk</a></pre><pre><a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a></pre><pre><br></pre></blockquote><div><br></div></body></html>