<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi,<br>
<br>
I have a local Nominatim instance with a US/Pennsylvania extract
loaded. When a make reverse geocode requests, I never get a state
back unless the coordinates are close to the centroid of the state.
<br>
<br>
I am aware that the openstreetmap version of Nominatim always
returns valid results for my test coordinates, so what am I doing
wrong?<br>
<br>
for example...
<a class="moz-txt-link-freetext" href="http://myserver/nominatim/reverse.php?format=xml&lat=40.658773&lon=-75.295520">http://myserver/nominatim/reverse.php?format=xml&lat=40.658773&lon=-75.295520</a><br>
<br>
returns<br>
<br>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<div class="line" style="color: rgb(0, 0, 0); font-family:
monospace; font-size: 13px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span
class="html-tag"><reversegeocode<span class="html-attribute"><span
class="Apple-converted-space"> </span><span
class="html-attribute-name">timestamp</span>="<span
class="html-attribute-value">Fri, 09 Jan 15 11:40:46 -0500</span>"</span><span
class="html-attribute"><span class="Apple-converted-space"> </span><span
class="html-attribute-name">attribution</span>="<span
class="html-attribute-value">Data © OpenStreetMap
contributors, ODbL 1.0.
<a class="moz-txt-link-freetext" href="http://www.openstreetmap.org/copyright">http://www.openstreetmap.org/copyright</a></span>"</span><span
class="html-attribute"><span class="Apple-converted-space"> </span><span
class="html-attribute-name">querystring</span>="<span
class="html-attribute-value">format=xml&lat=40.658773&lon=-75.295520</span>"</span>></span></div>
<div class="collapsible-content" style="margin-left: 1em; color:
rgb(0, 0, 0); font-family: monospace; font-size: 13px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align: start;
text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span
class="text"></span>
<div class="collapsible" id="collapsible1">
<div class="expanded">
<div class="line"><span class="button collapse-button"
style="-webkit-user-select: none; cursor: pointer;
display: inline-block; margin-left: -10px; width: 10px;
vertical-align: bottom; height: 10px; background-image:
-webkit-canvas(arrowDown); background-position: 0% 0%;
background-repeat: no-repeat;"></span><span
class="html-tag"><result<span class="html-attribute"><span
class="Apple-converted-space"> </span><span
class="html-attribute-name">place_id</span>="<span
class="html-attribute-value">637091</span>"</span><span
class="html-attribute"><span
class="Apple-converted-space"> </span><span
class="html-attribute-name">osm_type</span>="<span
class="html-attribute-value">way</span>"</span><span
class="html-attribute"><span
class="Apple-converted-space"> </span><span
class="html-attribute-name">osm_id</span>="<span
class="html-attribute-value">19996066</span>"</span><span
class="html-attribute"><span
class="Apple-converted-space"> </span><span
class="html-attribute-name">ref</span>="<span
class="html-attribute-value">Baglyos Circle</span>"</span><span
class="html-attribute"><span
class="Apple-converted-space"> </span><span
class="html-attribute-name">lat</span>="<span
class="html-attribute-value">40.6608768</span>"</span><span
class="html-attribute"><span
class="Apple-converted-space"> </span><span
class="html-attribute-name">lon</span>="<span
class="html-attribute-value">-75.2980609</span>"</span>></span></div>
<div class="collapsible-content" style="margin-left: 1em;"><span
class="text">Baglyos Circle, Farmersville, Northampton,
18020, United States of America</span></div>
<div class="line"><span class="html-tag"></result></span></div>
</div>
</div>
<div class="collapsible" id="collapsible2">
<div class="expanded">
<div class="line"><span class="button collapse-button"
style="-webkit-user-select: none; cursor: pointer;
display: inline-block; margin-left: -10px; width: 10px;
vertical-align: bottom; height: 10px; background-image:
-webkit-canvas(arrowDown); background-position: 0% 0%;
background-repeat: no-repeat;"></span><span
class="html-tag"><addressparts></span></div>
<div class="collapsible-content" style="margin-left: 1em;">
<div class="line"><span class="html-tag"><road></span><span
class="text">Baglyos Circle</span><span class="html-tag"></road></span></div>
<div class="line"><span class="html-tag"><hamlet></span><span
class="text">Farmersville</span><span class="html-tag"></hamlet></span></div>
<div class="line"><span class="html-tag"><county></span><span
class="text">Northampton</span><span class="html-tag"></county></span></div>
<div class="line"><span class="html-tag"><postcode></span><span
class="text">18020</span><span class="html-tag"></postcode></span></div>
<div class="line"><span class="html-tag"><country></span><span
class="text">United States of America</span><span
class="html-tag"></country></span></div>
<div class="line"><span class="html-tag"><country_code></span><span
class="text">us</span><span class="html-tag"></country_code></span></div>
</div>
<div class="line"><span class="html-tag"></addressparts></span></div>
</div>
</div>
</div>
<div class="line" style="color: rgb(0, 0, 0); font-family:
monospace; font-size: 13px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span
class="html-tag"></reversegeocode></span></div>
<br>
while <br>
<br>
<a class="moz-txt-link-freetext" href="http://myserver/nominatim/reverse.php?format=xml&lat=40.736505&lon=-77.884580">http://myserver/nominatim/reverse.php?format=xml&lat=40.736505&lon=-77.884580</a><br>
<br>
returns<br>
<br>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<div class="line" style="color: rgb(0, 0, 0); font-family:
monospace; font-size: 13px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span
class="html-tag"><reversegeocode<span class="html-attribute"><span
class="Apple-converted-space"> </span><span
class="html-attribute-name">timestamp</span>="<span
class="html-attribute-value">Fri, 09 Jan 15 11:45:27 -0500</span>"</span><span
class="html-attribute"><span class="Apple-converted-space"> </span><span
class="html-attribute-name">attribution</span>="<span
class="html-attribute-value">Data © OpenStreetMap
contributors, ODbL 1.0.
<a class="moz-txt-link-freetext" href="http://www.openstreetmap.org/copyright">http://www.openstreetmap.org/copyright</a></span>"</span><span
class="html-attribute"><span class="Apple-converted-space"> </span><span
class="html-attribute-name">querystring</span>="<span
class="html-attribute-value">format=xml&lat=40.736505&lon=-77.884580</span>"</span>></span></div>
<div class="collapsible-content" style="margin-left: 1em; color:
rgb(0, 0, 0); font-family: monospace; font-size: 13px; font-style:
normal; font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: normal; orphans: auto; text-align: start;
text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span
class="text"></span>
<div class="collapsible" id="collapsible1">
<div class="expanded">
<div class="line"><span class="button collapse-button"
style="-webkit-user-select: none; cursor: pointer;
display: inline-block; margin-left: -10px; width: 10px;
vertical-align: bottom; height: 10px; background-image:
-webkit-canvas(arrowDown); background-position: 0% 0%;
background-repeat: no-repeat;"></span><span
class="html-tag"><result<span class="html-attribute"><span
class="Apple-converted-space"> </span><span
class="html-attribute-name">place_id</span>="<span
class="html-attribute-value">320232</span>"</span><span
class="html-attribute"><span
class="Apple-converted-space"> </span><span
class="html-attribute-name">osm_type</span>="<span
class="html-attribute-value">way</span>"</span><span
class="html-attribute"><span
class="Apple-converted-space"> </span><span
class="html-attribute-name">osm_id</span>="<span
class="html-attribute-value">11842937</span>"</span><span
class="html-attribute"><span
class="Apple-converted-space"> </span><span
class="html-attribute-name">ref</span>="<span
class="html-attribute-value">Ward Alley</span>"</span><span
class="html-attribute"><span
class="Apple-converted-space"> </span><span
class="html-attribute-name">lat</span>="<span
class="html-attribute-value">40.735668</span>"</span><span
class="html-attribute"><span
class="Apple-converted-space"> </span><span
class="html-attribute-name">lon</span>="<span
class="html-attribute-value">-77.8842848</span>"</span>></span></div>
<div class="collapsible-content" style="margin-left: 1em;"><span
class="text">Ward Alley, Pine Grove Mills, Centre,
Pennsylvania, 16801, United States of America</span></div>
<div class="line"><span class="html-tag"></result></span></div>
</div>
</div>
<div class="collapsible" id="collapsible2">
<div class="expanded">
<div class="line"><span class="button collapse-button"
style="-webkit-user-select: none; cursor: pointer;
display: inline-block; margin-left: -10px; width: 10px;
vertical-align: bottom; height: 10px; background-image:
-webkit-canvas(arrowDown); background-position: 0% 0%;
background-repeat: no-repeat;"></span><span
class="html-tag"><addressparts></span></div>
<div class="collapsible-content" style="margin-left: 1em;">
<div class="line"><span class="html-tag"><road></span><span
class="text">Ward Alley</span><span class="html-tag"></road></span></div>
<div class="line"><span class="html-tag"><hamlet></span><span
class="text">Pine Grove Mills</span><span
class="html-tag"></hamlet></span></div>
<div class="line"><span class="html-tag"><county></span><span
class="text">Centre</span><span class="html-tag"></county></span></div>
<div class="line"><span class="html-tag"><state></span><span
class="text">Pennsylvania</span><span class="html-tag"></state></span></div>
<div class="line"><span class="html-tag"><postcode></span><span
class="text">16801</span><span class="html-tag"></postcode></span></div>
<div class="line"><span class="html-tag"><country></span><span
class="text">United States of America</span><span
class="html-tag"></country></span></div>
<div class="line"><span class="html-tag"><country_code></span><span
class="text">us</span><span class="html-tag"></country_code></span></div>
</div>
<div class="line"><span class="html-tag"></addressparts></span></div>
</div>
</div>
</div>
<div class="line" style="color: rgb(0, 0, 0); font-family:
monospace; font-size: 13px; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-stroke-width: 0px;"><span
class="html-tag"></reversegeocode></span></div>
<br>
Thanks,<br>
John<br>
</body>
</html>