<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi Gerd,</div><div class=""><br class=""></div><div class="">I found the first issue why so many cities were missing. It turns out in my area many boundaries contain 'place_name' instead of 'name'. Examples:&nbsp;<a href="http://overpass-turbo.eu/s/5HL" class="">http://overpass-turbo.eu/s/5HL</a></div><div class=""><br class=""></div><div class="">I realize I could add this tag to&nbsp;name-tag-list, but i think it would be better to have it searched as a last resort. Thus, I propose the following patch:</div><div class=""><br class=""></div><div class=""><div class="">Index: src/uk/me/parabola/mkgmap/reader/osm/boundary/BoundaryLocationPreparer.java</div><div class="">===================================================================</div><div class="">--- src/uk/me/parabola/mkgmap/reader/osm/boundary/BoundaryLocationPreparer.java<span class="Apple-tab-span" style="white-space:pre">        </span>(revision 3341)</div><div class="">+++ src/uk/me/parabola/mkgmap/reader/osm/boundary/BoundaryLocationPreparer.java<span class="Apple-tab-span" style="white-space:pre">        </span>(working copy)</div><div class="">@@ -69,6 +69,9 @@</div><div class="">&nbsp;<span class="Apple-tab-span" style="white-space:pre">                </span>int admLevel = getAdminLevel(tags);</div><div class="">&nbsp;<span class="Apple-tab-span" style="white-space:pre">                </span>boolean isISO = false;</div><div class="">&nbsp;<span class="Apple-tab-span" style="white-space:pre">                </span>String name = getName(tags);</div><div class="">+<span class="Apple-tab-span" style="white-space:pre">                </span>if (name == null) {</div><div class="">+<span class="Apple-tab-span" style="white-space:pre">                        </span>log.warn("No name found for boundary", tags);</div><div class="">+<span class="Apple-tab-span" style="white-space:pre">                </span>}</div><div class="">&nbsp;<span class="Apple-tab-span" style="white-space:pre">                </span>if (locator != null){</div><div class="">&nbsp;<span class="Apple-tab-span" style="white-space:pre">                        </span>if (admLevel == 2) {</div><div class="">&nbsp;<span class="Apple-tab-span" style="white-space:pre">                                </span>String isoCode = locator.addCountry(tags);</div><div class=""><div class="">@@ -142,6 +145,11 @@</div><div class="">&nbsp;<span class="Apple-tab-span" style="white-space:pre">                        </span>}</div><div class="">&nbsp;<span class="Apple-tab-span" style="white-space:pre">                        </span>return nameParts[0].trim().intern();</div><div class="">&nbsp;<span class="Apple-tab-span" style="white-space:pre">                </span>}</div><div class="">+<span class="Apple-tab-span" style="white-space:pre">                </span>String place_name = tags.get("place_name");</div><div class="">+<span class="Apple-tab-span" style="white-space:pre">                </span>if (place_name != null) {</div><div class="">+<span class="Apple-tab-span" style="white-space:pre">                        </span>log.warn("Boundry has controversial place_name:", place_name, tags, "<a href="http://wiki.openstreetmap.org/wiki/Proposed_features/drop_recommendation_for_place_name" class="">http://wiki.openstreetmap.org/wiki/Proposed_features/drop_recommendation_for_place_name</a>");</div><div class="">+<span class="Apple-tab-span" style="white-space:pre">                        </span>return place_name;</div><div class="">+<span class="Apple-tab-span" style="white-space:pre">                </span>}</div><div class="">&nbsp;<span class="Apple-tab-span" style="white-space:pre">                </span></div><div class="">&nbsp;<span class="Apple-tab-span" style="white-space:pre">                </span>return null;</div><div class="">&nbsp;<span class="Apple-tab-span" style="white-space:pre">        </span>}</div></div></div><div class=""><br class=""></div><div class="">Secondly, while I don't have a complete admin_level2 in my boundary file, most city, county and state boundaries contain is_in tags. For example, Danbury (<a href="http://www.openstreetmap.org/way/33271879" class="">http://www.openstreetmap.org/way/33271879</a>), contains&nbsp;</div><div class=""><table class="browse-tag-list" style="box-sizing: border-box; border-spacing: 0px; width: 310px; margin-bottom: 20px; border: 1px solid rgb(221, 221, 221); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; font-size: 12px; table-layout: fixed; color: rgb(34, 34, 34); font-family: 'Helvetica Neue', Arial, sans-serif; line-height: 19.9992008209229px; background-color: rgb(246, 246, 246);"><tbody style="box-sizing: border-box;" class=""><tr style="box-sizing: border-box;" class=""><th class="browse-tag-k" style="box-sizing: border-box; padding: 6px 10px; line-height: 20px; font-weight: 500; vertical-align: top; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(221, 221, 221); width: 154px; word-wrap: break-word;"><a href="http://wiki.openstreetmap.org/wiki/Key:is%20in:country?uselang=en-US" title="The wiki description page for the is_in:country tag" style="box-sizing: border-box; color: rgb(34, 68, 221); -webkit-appearance: none; outline: 0px;" class="">is_in:country</a></th><td class="browse-tag-v" style="box-sizing: border-box; padding: 6px 10px; line-height: 20px; vertical-align: middle; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(221, 221, 221); width: 154px; word-wrap: break-word; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(221, 221, 221); background-color: rgb(255, 255, 255);">USA</td></tr></tbody></table><div class=""><table class="browse-tag-list" style="box-sizing: border-box; border-spacing: 0px; width: 310px; margin-bottom: 20px; border: 1px solid rgb(221, 221, 221); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; font-size: 12px; table-layout: fixed; color: rgb(34, 34, 34); font-family: 'Helvetica Neue', Arial, sans-serif; line-height: 19.9992008209229px; background-color: rgb(246, 246, 246);"><tbody style="box-sizing: border-box;" class=""><tr style="box-sizing: border-box;" class=""><th class="browse-tag-k" style="box-sizing: border-box; padding: 6px 10px; line-height: 20px; font-weight: 500; vertical-align: top; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(221, 221, 221); width: 154px; word-wrap: break-word;"><a href="http://wiki.openstreetmap.org/wiki/Key:is%20in:state?uselang=en-US" title="The wiki description page for the is_in:state tag" style="box-sizing: border-box; color: rgb(34, 68, 221); text-decoration: none; -webkit-appearance: none; outline: 0px;" class="">is_in:state</a></th><td class="browse-tag-v" style="box-sizing: border-box; padding: 6px 10px; line-height: 20px; vertical-align: middle; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(221, 221, 221); width: 154px; word-wrap: break-word; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(221, 221, 221); background-color: rgb(255, 255, 255);">Connecticut</td></tr></tbody></table><div class="">With these tags, I should be able to set state and country information even if I don't have those boundaries explicitly loaded. I was thinking this extra information could be added to the&nbsp;BoundaryLocationInfo class, much like how the zip code is today. What do you think about that approach?</div></div></div><div class=""><br class=""></div><div class="">Brian</div><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 30, 2014, at 4:00 AM, Gerd Petermann &lt;<a href="mailto:gpetermann_muenchen@hotmail.com" class="">gpetermann_muenchen@hotmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class="">

<style class=""><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div class="hmmessage"><div dir="ltr" class="">Hi Brian,<br class=""><br class="">I see.<br class="">I fear the meanings of the --country-xxx options are not well documented.<br class="">If I got it right, they have an influence on the address search indexes, but they have no <br class="">meaning for the rules in the style.<br class=""><br class="">Maybe your problem could be solved with an<br class="">additional line in the address rule. Something like this<br class="">mkgmap:admin_level5='New York City' &amp; mkgmap:admin_level2!=* { set mkgmap:admin_level2='USA' }<br class="">as a first line in inc/address.<br class=""><br class="">Another option would be to change the LocationHook to optionally use the <br class="">values given with --country-xxx to fill the mkgmap:admin_level2 tag.<br class=""><br class="">Gerd<br class=""><br class=""><div class=""><hr id="stopSpelling" class="">From: <a href="mailto:brianegge@gmail.com" class="">brianegge@gmail.com</a><br class="">Date: Thu, 30 Oct 2014 02:38:17 +0000<br class="">To: <a href="mailto:mkgmap-dev@lists.mkgmap.org.uk" class="">mkgmap-dev@lists.mkgmap.org.uk</a><br class="">Subject: Re: [mkgmap-dev] Building northeast map<br class=""><br class="">Thanks Gerd,<br class=""><br class=""><div class="">I've been adding/fixing city boundaries in my area, so I'm trying to create my own bounds file. If an admin_level2 can't be found, does it use the&nbsp;<b style="font-family: sans-serif; line-height: 19.2000007629395px;" class="">--country-abbr </b><span style="font-family: sans-serif; line-height: 19.2000007629395px;" class="">option?</span></div><div class=""><span style="font-family: sans-serif; line-height: 19.2000007629395px;" class=""><br class=""></span></div><div class=""><span style="font-family: sans-serif; line-height: 19.2000007629395px;" class="">Brian</span></div></div></div></div></div></blockquote></div><br class=""></body></html>