[mkgmap-dev] Use both addr:city and admin_level as city for address search
From Lorenzo Mastrogiacomi lomastrolo at gmail.com on Sun May 13 11:09:29 BST 2018
Not a big problem Gerd, maybe all of them are tagging errors. Thanks Lorenzo Il giorno dom, 13/05/2018 alle 08.52 +0000, Gerd Petermann ha scritto: > Hi Lorenzo, > > I found no solution for a case insensitive compare of two tags. Maybe someone else has an idea ? > Maybe we can implement a new operator for that, maybe a new filter or style function. Any suggestions? > > Gerd > > ________________________________________ > Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Lorenzo Mastrogiacomi <lomastrolo at gmail.com> > Gesendet: Samstag, 12. Mai 2018 19:25:18 > An: mkgmap-dev at lists.mkgmap.org.uk > Betreff: Re: [mkgmap-dev] Use both addr:city and admin_level as city for address search > > 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 <mkgmap-dev-bounces at lists.mkgmap.org.uk<mailto:mkgmap-dev-bounces at lists.mkgmap.org.uk>> im Auftrag von Lorenzo Mastrogiacomi <lomastrolo at gmail.com<mailto:lomastrolo at gmail.com>> > > Gesendet: Samstag, 12. Mai 2018 15:00:56 > > An: mkgmap-dev at lists.mkgmap.org.uk<mailto:mkgmap-dev at lists.mkgmap.org.uk> > > 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 > > mkgmap-dev at lists.mkgmap.org.uk<mailto:mkgmap-dev at lists.mkgmap.org.uk> > > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > > > _______________________________________________ > mkgmap-dev mailing list > mkgmap-dev at lists.mkgmap.org.uk > http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20180513/2f09c8a6/attachment-0001.html>
- Previous message: [mkgmap-dev] Use both addr:city and admin_level as city for address search
- Next message: [mkgmap-dev] Use both addr:city and admin_level as city for address search
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list