<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hello,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Maybe a function which can both lowercase/uppercase/propercase left and right side of the compare</p>
<p style="margin-top:0;margin-bottom:0">Something like this?</p>
<p style="margin-top:0;margin-bottom:0">lcase('$<span style="color: rgb(33, 33, 33); font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont; font-size: 15px;">addr:city') != lcase('$mkgmap:admin_level8'</span>)</p>
<p style="margin-top:0;margin-bottom:0">highway = service {set addr:street = lcase('$<span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">name'</span>)}</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">gr Joris</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"></p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Van:</b> mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> namens Gerd Petermann <gpetermann_muenchen@hotmail.com><br>
<b>Verzonden:</b> zondag 13 mei 2018 10:52:52<br>
<b>Aan:</b> Development list for mkgmap<br>
<b>Onderwerp:</b> Re: [mkgmap-dev] Use both addr:city and admin_level as city for address search</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Hi Lorenzo,<br>
<br>
I found no solution for a case insensitive compare of two tags. Maybe someone else has an idea ?<br>
Maybe we can implement a new operator for that, maybe a new filter or style function. Any suggestions?<br>
<br>
Gerd<br>
<br>
________________________________________<br>
Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Lorenzo Mastrogiacomi <lomastrolo@gmail.com><br>
Gesendet: Samstag, 12. Mai 2018 19:25:18<br>
An: mkgmap-dev@lists.mkgmap.org.uk<br>
Betreff: Re: [mkgmap-dev] Use both addr:city and admin_level as city for address        search<br>
<br>
Yes, this is good :) :<br>
addr:city!=$mkgmap:admin_level8<br>
<br>
Can I make this check case insensitive?<br>
<br>
<br>
<br>
Lorenzo<br>
<br>
<br>
<br>
Il giorno sab, 12/05/2018 alle 16.15 +0000, Gerd Petermann ha scritto:<br>
<br>
Hi Lorenzo,<br>
<br>
<br>
the term 'addr:city'!='mkgmap:admin_level8'  is always true because you compare two strings. Maybe you want to compare the values<br>
<br>
of the tags instead?<br>
<br>
<br>
Gerd<br>
<br>
<br>
________________________________________<br>
<br>
Von: mkgmap-dev <mkgmap-dev-bounces@lists.mkgmap.org.uk<mailto:mkgmap-dev-bounces@lists.mkgmap.org.uk>> im Auftrag von Lorenzo Mastrogiacomi <lomastrolo@gmail.com<mailto:lomastrolo@gmail.com>><br>
<br>
Gesendet: Samstag, 12. Mai 2018 15:00:56<br>
<br>
An: mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk><br>
<br>
Betreff: [mkgmap-dev] Use both addr:city and admin_level as city for address    search<br>
<br>
<br>
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.<br>
<br>
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=*).<br>
<br>
I use the default style with little modifications and added this rules in the points file.<br>
<br>
<br>
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.<br>
<br>
addr:city=* & 'addr:city'!='mkgmap:admin_level8' [0x3200 continue with_actions]<br>
<br>
<br>
Then set mkgmap:city with the addr:city value to have this as city for the following matches.<br>
<br>
addr:city=* & 'addr:city'!='mkgmap:admin_level8' { set mkgmap:city='${addr:city}' }<br>
<br>
<br>
I also added modified the rule at the bottom to avoid "fake" objects to get a name and show on the map.<br>
<br>
!(addr:city=* & 'addr:city'!='mkgmap:admin_level8' & mkgmap:city!=*) &<br>
<br>
name=* { name '${name}' }<br>
<br>
<br>
<br>
<br>
This seems to work pretty well but it looks rather complicated. I wonder if there is a better way to do this. Any thoughts?<br>
<br>
<br>
These are my options:<br>
<br>
        --style-file=$style_reg \<br>
<br>
        --latin1 \<br>
<br>
        --country-name=Italia \<br>
<br>
        --country-abbr="$abbr" \<br>
<br>
        --region-name="$nome_reg" \<br>
<br>
        --area-name="$nome_reg" \<br>
<br>
        --family-name="OpenStreetMap: Mappe regionali ital.img" \<br>
<br>
        --description="$nome_reg" \<br>
<br>
        --series-name="$serie" \<br>
<br>
        --precomp-sea=${MYPATH}/sea/ \<br>
<br>
        --generate-sea \<br>
<br>
        --bounds=${MYPATH}/bounds/ \<br>
<br>
        --max-jobs \<br>
<br>
        --route \<br>
<br>
        --drive-on=detect,right \<br>
<br>
        --process-destination \<br>
<br>
        --process-exits \<br>
<br>
        --location-autofill=is_in,nearest \<br>
<br>
        --index \<br>
<br>
        --split-name-index \<br>
<br>
        --housenumbers \<br>
<br>
        --add-pois-to-areas \<br>
<br>
        --link-pois-to-ways \<br>
<br>
        --preserve-element-order \<br>
<br>
        --verbose \<br>
<br>
        --name-tag-list=name,name:it,loc_name,reg_name,nat_name \<br>
<br>
        --draw-priority=$priority \<br>
<br>
        --reduce-point-density=3.2 \<br>
<br>
        --make-opposite-cycleways \<br>
<br>
        --gmapsupp<br>
<br>
<br>
<br>
Lorenzo<br>
<br>
_______________________________________________<br>
<br>
mkgmap-dev mailing list<br>
<br>
mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk><br>
<br>
<a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br>
<br>
<br>
_______________________________________________<br>
mkgmap-dev mailing list<br>
mkgmap-dev@lists.mkgmap.org.uk<br>
<a href="http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev">http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</a><br>
</div>
</span></font></div>
</body>
</html>