You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inside a browser you're sending the accept-language header, in your case pl.pl-Pl;q=0.95,en-US;q=0.89;... By default on command-line you don't send it and thus the default gets set to en.
curl "http://SERVER/nominatim/search.php?q=GERMANY+BAD+SCHWALBACH+65307+pfahlweg+1&polygon=0&format=json&addressdetails=0"
no results
curl "http://SERVER/nominatim/search.php?q=GERMANY+BAD+SCHWALBACH+65307+pfahlweg+1&polygon=0&format=json&addressdetails=0&accept-language=en"
no results
curl "http://SERVER/nominatim/search.php?q=GERMANY+BAD+SCHWALBACH+65307+pfahlweg+1&polygon=0&format=json&addressdetails=0&accept-language=de"
no results
curl "http://SERVER/nominatim/search.php?q=GERMANY+BAD+SCHWALBACH+65307+pfahlweg+1&polygon=0&format=json&addressdetails=0&accept-language=pl.pl-Pl;q=0.95,en-US;q=0.89;"
several results
That explains the difference between terminal and browser, but it doesn't explain why the address doesn't get found.
I tried pfahlweg+1,65307,BAD+SCHWALBACH,GERMANY and that worked fine. Do you have your addresses structured enough to order them small...large? Or even use structured parameter (http://wiki.openstreetmap.org/wiki/Nominatim, look for street=)?
The query is in reverse order, which Nominatim will only consider for certain accept-languages. Try setting ReverseInPlan per default to true about here.
We really should be making this the default. It has been working well on osm.org for ages.
lonvia
changed the title
Api - difference between browser and wget
Make reverseInPlan true by default
Aug 8, 2015
Hello,
I notice that at my local instance of Nominatim there is a difference between browser and wget
request:
For address http://myserver/nominatim/search.php?q=GERMANY+BAD+SCHWALBACH+65307+pfahlweg+1&polygon=0&format=xml&addressdetails=1
from brower I get 3 "place" nodes in XML (this is ok )
but wget returns following message (there is no "place" nodes)
for command
wget --output-document file.log 'http://myserver/nominatim/search.php?q=GERMANY+BAD+SCHWALBACH+65307+pfahlweg+1&polygon=0&format=xml&addressdetails=1'
Request to nominatim site
wget --output-document file.log 'http://nominatim.openstreetmap.org/search.php?q=GERMANY+BAD+SCHWALBACH+65307+pfahlweg+1&polygon=0&format=xml&addressdetails=1'
returns full result
I think that I need to fix/change some settings in my installation but I don`t have idea what I should change. Maybe sombody
had similar issue ?
Regards,
Piotr
The text was updated successfully, but these errors were encountered: