mkgmap:city empty in large cities

Hi all, I noticed that our rules in inc/address do not set mkgmap:city in Ottawa/Ontario. Adding an additional line like the 2nd below solves the problem: # Canada mkgmap:country=CAN & mkgmap:region!=* & mkgmap:admin_level4=* { set mkgmap:region='${mkgmap:admin_level4}' } mkgmap:country=CAN & mkgmap:city!=* & mkgmap:admin_level6=Ottawa { set mkgmap:city='${mkgmap:admin_level6}' } mkgmap:country=CAN & mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:City of }' } or should we add a one to this block: mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8}' } mkgmap:city!=* & mkgmap:admin_level7=* { set mkgmap:city='${mkgmap:admin_level7}' } mkgmap:city!=* & mkgmap:admin_level9=* { set mkgmap:city='${mkgmap:admin_level9}' } mkgmap:city!=* & mkgmap:admin_level10=* { set mkgmap:city='${mkgmap:admin_level10}' } e.g. a further line with mkgmap:city!=* & mkgmap:admin_level6=* { set mkgmap:city='${mkgmap:admin_level6}' } I assume that there are more large cities with this problem. Does anybody know how to find them without mkgmap ? Gerd

Hi Gerd, I think the problem with Ottawa is a problem with the data. The current Ottawa boundary describes a municipal level entity composed of the a bunch of former small cities (including the city of Ottawa which is now downtown area of Ottawa). Looking at Canada in the administrative boundary list and using Toronto as an example, the current Ottawa boundary should be admin level 8. https://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative The National Capital Region should be admin level 6 but I can't find a boundary for it. https://en.wikipedia.org/wiki/National_Capital_Region_%28Canada%29 The suburbs within Ottawa (the former full cities) should be admin level 10. Again there are no boundaries but these suburbs are used officially for addresses. For instance, you can find Kanata listed in the Canada Post postal code lookup app. https://www.canadapost.ca/cpo/mc/personal/postalcode/fpc.jsf It looks like the address setup in mkgmap is incorrect for this setup because admin level 10 is what people use for addresses in the big cities in Canada. I can fix this and send a patch. As for your original question, I think adding the safety catch at the end would be a good idea just in case there are other areas that have broken data. or should we add a one to this block:
mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8}' } mkgmap:city!=* & mkgmap:admin_level7=* { set mkgmap:city='${mkgmap:admin_level7}' } mkgmap:city!=* & mkgmap:admin_level9=* { set mkgmap:city='${mkgmap:admin_level9}' } mkgmap:city!=* & mkgmap:admin_level10=* { set mkgmap:city='${mkgmap:admin_level10}' } e.g. a further line with mkgmap:city!=* & mkgmap:admin_level6=* { set mkgmap:city='${mkgmap:admin_level6}' }
Nice catch! Thanks, Ben On Thu, Apr 23, 2015 at 10:13 AM, Gerd Petermann < gpetermann_muenchen@hotmail.com> wrote:
Hi all,
I noticed that our rules in inc/address do not set mkgmap:city in Ottawa/Ontario. Adding an additional line like the 2nd below solves the problem: # Canada mkgmap:country=CAN & mkgmap:region!=* & mkgmap:admin_level4=* { set mkgmap:region='${mkgmap:admin_level4}' } mkgmap:country=CAN & mkgmap:city!=* & mkgmap:admin_level6=Ottawa { set mkgmap:city='${mkgmap:admin_level6}' } mkgmap:country=CAN & mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:City of }' }
or should we add a one to this block: mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8}' } mkgmap:city!=* & mkgmap:admin_level7=* { set mkgmap:city='${mkgmap:admin_level7}' } mkgmap:city!=* & mkgmap:admin_level9=* { set mkgmap:city='${mkgmap:admin_level9}' } mkgmap:city!=* & mkgmap:admin_level10=* { set mkgmap:city='${mkgmap:admin_level10}' } e.g. a further line with mkgmap:city!=* & mkgmap:admin_level6=* { set mkgmap:city='${mkgmap:admin_level6}' }
I assume that there are more large cities with this problem. Does anybody know how to find them without mkgmap ?
Gerd
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Ben, thanks for the details. I did not think about an error in the OSM data because we already have a few special rules for other big towns, e.g. in Germany wie have Hamburg, Bremen and Berlin which are special because politically they also have the role "Bundesland" like Bavaria or Lower Saxony. Also, I tried older boundary files and Ottawa never appeared as admin level 8. Maybe I can code a test routine for the boundary data that uses the geonames data from http://download.geonames.org/export/dump/ to verify that a POI created for that location has the mkgmap:city tag filled with the proper name. Gerd Date: Fri, 24 Apr 2015 14:15:13 +0200 From: ben@bagu.org To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] mkgmap:city empty in large cities Hi Gerd, I think the problem with Ottawa is a problem with the data. The current Ottawa boundary describes a municipal level entity composed of the a bunch of former small cities (including the city of Ottawa which is now downtown area of Ottawa). Looking at Canada in the administrative boundary list and using Toronto as an example, the current Ottawa boundary should be admin level 8. https://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative The National Capital Region should be admin level 6 but I can't find a boundary for it. https://en.wikipedia.org/wiki/National_Capital_Region_%28Canada%29 The suburbs within Ottawa (the former full cities) should be admin level 10. Again there are no boundaries but these suburbs are used officially for addresses. For instance, you can find Kanata listed in the Canada Post postal code lookup app. https://www.canadapost.ca/cpo/mc/personal/postalcode/fpc.jsf It looks like the address setup in mkgmap is incorrect for this setup because admin level 10 is what people use for addresses in the big cities in Canada. I can fix this and send a patch. As for your original question, I think adding the safety catch at the end would be a good idea just in case there are other areas that have broken data. or should we add a one to this block: mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8}' } mkgmap:city!=* & mkgmap:admin_level7=* { set mkgmap:city='${mkgmap:admin_level7}' } mkgmap:city!=* & mkgmap:admin_level9=* { set mkgmap:city='${mkgmap:admin_level9}' } mkgmap:city!=* & mkgmap:admin_level10=* { set mkgmap:city='${mkgmap:admin_level10}' } e.g. a further line with mkgmap:city!=* & mkgmap:admin_level6=* { set mkgmap:city='${mkgmap:admin_level6}' } Nice catch! Thanks, Ben On Thu, Apr 23, 2015 at 10:13 AM, Gerd Petermann <gpetermann_muenchen@hotmail.com> wrote: Hi all, I noticed that our rules in inc/address do not set mkgmap:city in Ottawa/Ontario. Adding an additional line like the 2nd below solves the problem: # Canada mkgmap:country=CAN & mkgmap:region!=* & mkgmap:admin_level4=* { set mkgmap:region='${mkgmap:admin_level4}' } mkgmap:country=CAN & mkgmap:city!=* & mkgmap:admin_level6=Ottawa { set mkgmap:city='${mkgmap:admin_level6}' } mkgmap:country=CAN & mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8|subst:City of }' } or should we add a one to this block: mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8}' } mkgmap:city!=* & mkgmap:admin_level7=* { set mkgmap:city='${mkgmap:admin_level7}' } mkgmap:city!=* & mkgmap:admin_level9=* { set mkgmap:city='${mkgmap:admin_level9}' } mkgmap:city!=* & mkgmap:admin_level10=* { set mkgmap:city='${mkgmap:admin_level10}' } e.g. a further line with mkgmap:city!=* & mkgmap:admin_level6=* { set mkgmap:city='${mkgmap:admin_level6}' } I assume that there are more large cities with this problem. Does anybody know how to find them without mkgmap ? Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, I was a bit wrong with my analysis of Ottawa and Toronto. Toronto and Ottawa should be admin level 8 and the 'cities' within Toronto and Ottawa should be admin level 9 (as Orleans was already tagged). I've corrected the labelling issues in OSM but I didn't add the missing 'city' boundaries inside Ottawa. I've attached a patch that corrects address search for Toronto and Ottawa. You'll need updated bounds data for this to work but I have confirmed that it's working. It would be nice to get this included in mkgamp. Thanks, Ben

Hi Ben, thanks for the patch. Just to make sure: The additional rules have no effect until one has updated bounds, so I can commit that without causing trouble, right? Gerd Date: Tue, 28 Apr 2015 09:43:03 +0200 From: ben@bagu.org To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] mkgmap:city empty in large cities Hi Gerd, I was a bit wrong with my analysis of Ottawa and Toronto. Toronto and Ottawa should be admin level 8 and the 'cities' within Toronto and Ottawa should be admin level 9 (as Orleans was already tagged). I've corrected the labelling issues in OSM but I didn't add the missing 'city' boundaries inside Ottawa. I've attached a patch that corrects address search for Toronto and Ottawa. You'll need updated bounds data for this to work but I have confirmed that it's working. It would be nice to get this included in mkgamp. Thanks, Ben _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, Yes, that's correct. The patch will have no effect until the bounds are updated to OSM data that's newer than 27 April 2015. Thanks, Ben On Tue, Apr 28, 2015 at 10:04 AM, Gerd Petermann < gpetermann_muenchen@hotmail.com> wrote:
Hi Ben,
thanks for the patch. Just to make sure: The additional rules have no effect until one has updated bounds, so I can commit that without causing trouble, right?
Gerd
------------------------------ Date: Tue, 28 Apr 2015 09:43:03 +0200 From: ben@bagu.org To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] mkgmap:city empty in large cities
Hi Gerd,
I was a bit wrong with my analysis of Ottawa and Toronto. Toronto and Ottawa should be admin level 8 and the 'cities' within Toronto and Ottawa should be admin level 9 (as Orleans was already tagged). I've corrected the labelling issues in OSM but I didn't add the missing 'city' boundaries inside Ottawa.
I've attached a patch that corrects address search for Toronto and Ottawa. You'll need updated bounds data for this to work but I have confirmed that it's working. It would be nice to get this included in mkgamp.
Thanks, Ben
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (2)
-
Ben Konrath
-
Gerd Petermann