<html>
<head>
</head>
<body class='hmmessage'><div dir='ltr'>

<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr">Hi Brian,<br><br>reg. your patch: I don't understand why you think that this works better than adding place_name to <br>the end of the name-tag-list. It seems to have the same effect, but would be hard-coded?<br><br>Reg. is_in:country and is_in:state:<br>I don't understand what change you have in mind. Do you want to fill fields like mkgmap:admin_level2 using<br>the values given in is_in:country if the value would be null else?<br><br>Gerd<br><br><br><div><hr id="stopSpelling">From: brianegge@gmail.com<br>Date: Fri, 31 Oct 2014 00:10:56 -0400<br>To: mkgmap-dev@lists.mkgmap.org.uk<br>Subject: Re: [mkgmap-dev] Building northeast map<br><br><div>Hi Gerd,</div><div><br></div><div>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" target="_blank">http://overpass-turbo.eu/s/5HL</a></div><div><br></div><div>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><br></div><div><div>Index: src/uk/me/parabola/mkgmap/reader/osm/boundary/BoundaryLocationPreparer.java</div><div>===================================================================</div><div>--- src/uk/me/parabola/mkgmap/reader/osm/boundary/BoundaryLocationPreparer.java<span class="ecxApple-tab-span" style="white-space:pre;">        </span>(revision 3341)</div><div>+++ src/uk/me/parabola/mkgmap/reader/osm/boundary/BoundaryLocationPreparer.java<span class="ecxApple-tab-span" style="white-space:pre;">        </span>(working copy)</div><div>@@ -69,6 +69,9 @@</div><div>&nbsp;<span class="ecxApple-tab-span" style="white-space:pre;">                </span>int admLevel = getAdminLevel(tags);</div><div>&nbsp;<span class="ecxApple-tab-span" style="white-space:pre;">                </span>boolean isISO = false;</div><div>&nbsp;<span class="ecxApple-tab-span" style="white-space:pre;">                </span>String name = getName(tags);</div><div>+<span class="ecxApple-tab-span" style="white-space:pre;">                </span>if (name == null) {</div><div>+<span class="ecxApple-tab-span" style="white-space:pre;">                        </span>log.warn("No name found for boundary", tags);</div><div>+<span class="ecxApple-tab-span" style="white-space:pre;">                </span>}</div><div>&nbsp;<span class="ecxApple-tab-span" style="white-space:pre;">                </span>if (locator != null){</div><div>&nbsp;<span class="ecxApple-tab-span" style="white-space:pre;">                        </span>if (admLevel == 2) {</div><div>&nbsp;<span class="ecxApple-tab-span" style="white-space:pre;">                                </span>String isoCode = locator.addCountry(tags);</div><div><div>@@ -142,6 +145,11 @@</div><div>&nbsp;<span class="ecxApple-tab-span" style="white-space:pre;">                        </span>}</div><div>&nbsp;<span class="ecxApple-tab-span" style="white-space:pre;">                        </span>return nameParts[0].trim().intern();</div><div>&nbsp;<span class="ecxApple-tab-span" style="white-space:pre;">                </span>}</div><div>+<span class="ecxApple-tab-span" style="white-space:pre;">                </span>String place_name = tags.get("place_name");</div><div>+<span class="ecxApple-tab-span" style="white-space:pre;">                </span>if (place_name != null) {</div><div>+<span class="ecxApple-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" target="_blank">http://wiki.openstreetmap.org/wiki/Proposed_features/drop_recommendation_for_place_name</a>");</div><div>+<span class="ecxApple-tab-span" style="white-space:pre;">                        </span>return place_name;</div><div>+<span class="ecxApple-tab-span" style="white-space:pre;">                </span>}</div><div>&nbsp;<span class="ecxApple-tab-span" style="white-space:pre;">                </span></div><div>&nbsp;<span class="ecxApple-tab-span" style="white-space:pre;">                </span>return null;</div><div>&nbsp;<span class="ecxApple-tab-span" style="white-space:pre;">        </span>}</div></div></div><div><br></div><div>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" target="_blank">http://www.openstreetmap.org/way/33271879</a>), contains&nbsp;</div><div><table class="ecxbrowse-tag-list" style="box-sizing:border-box;border-spacing:0px;width:310px;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;"><tr style="box-sizing:border-box;"><th class="ecxbrowse-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);" target="_blank">is_in:country</a></th><td class="ecxbrowse-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><table class="ecxbrowse-tag-list" style="box-sizing:border-box;border-spacing:0px;width:310px;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;"><tr style="box-sizing:border-box;"><th class="ecxbrowse-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;" target="_blank">is_in:state</a></th><td class="ecxbrowse-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>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><br></div><div>Brian</div><br><div><blockquote><div>On Oct 30, 2014, at 4:00 AM, Gerd Petermann &lt;<a href="mailto:gpetermann_muenchen@hotmail.com">gpetermann_muenchen@hotmail.com</a>&gt; wrote:</div><br class="ecxApple-interchange-newline"><div>

<style>
.ExternalClass .ecxhmmessage P {
padding:0px;
}

.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}

</style>
<div class="ecxhmmessage"><div dir="ltr">Hi Brian,<br><br>I see.<br>I fear the meanings of the --country-xxx options are not well documented.<br>If I got it right, they have an influence on the address search indexes, but they have no <br>meaning for the rules in the style.<br><br>Maybe your problem could be solved with an<br>additional line in the address rule. Something like this<br>mkgmap:admin_level5='New York City' &amp; mkgmap:admin_level2!=* { set mkgmap:admin_level2='USA' }<br>as a first line in inc/address.<br><br>Another option would be to change the LocationHook to optionally use the <br>values given with --country-xxx to fill the mkgmap:admin_level2 tag.<br><br>Gerd<br><br><div><hr id="ecxstopSpelling">From: <a href="mailto:brianegge@gmail.com">brianegge@gmail.com</a><br>Date: Thu, 30 Oct 2014 02:38:17 +0000<br>To: <a href="mailto:mkgmap-dev@lists.mkgmap.org.uk">mkgmap-dev@lists.mkgmap.org.uk</a><br>Subject: Re: [mkgmap-dev] Building northeast map<br><br>Thanks Gerd,<br><br><div>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;">--country-abbr </b><span style="font-family:sans-serif;line-height:19.2000007629395px;">option?</span></div><div><span style="font-family:sans-serif;line-height:19.2000007629395px;"><br></span></div><div><span style="font-family:sans-serif;line-height:19.2000007629395px;">Brian</span></div></div></div></div></div></blockquote></div><br><br>_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev</div></div>
                                               </div></body>
</html>