[Geocoding] [OpenStreetMap] #5157: Argentina country_code abbreviation is wrong
OpenStreetMap
trac at noreply.openstreetmap.org
Tue Apr 22 08:13:06 UTC 2014
#5157: Argentina country_code abbreviation is wrong
------------------------+-------------------------
Reporter: jenciso | Owner: geocoding@…
Type: defect | Status: closed
Priority: minor | Milestone:
Component: nominatim | Version: 2.0
Resolution: fixed | Keywords:
------------------------+-------------------------
Changes (by andersg):
* status: new => closed
* resolution: => fixed
Comment:
Hi,
This is recently solved by this commit
https://github.com/twain47/Nominatim/commit/589bad809ef11bd8fe94ffa0
To update an install apply this patch. Then do a to apply changes
./utils/setup.php --enable-diff-updates --create-functions --create-
partition-functions
Find the place_id for Argentina, Norway and Australia and do the
following:
update placex set indexed_status = 2 where place_id = <country place_id>;
//for each country
./utils/update --index --index-instances 2
Check if country codes are correct for countries. Then do this which will
take some time (1-2 days with a full planet on a decent machine):
select place_force_update(<country place_id>); //for each country
./utils/update --index --index-instances 2
/Anders
Replying to [ticket:5157 jenciso]:
> Hi
>
> I'm using Nominatim 2.2 version for reverse query. In this request (see
below) the response for country_code is wrong, it should be "ar" instead
"aq". I would like to know if it could be fixed modify someone row in the
postgre table.
>
> Thanks
>
>
> [root at 1yt ~]# curl -vs
'http://localhost/nominatim/reverse.php?format=xml&lat=-34.612869&lon=-58.4459789&zoom=18&addressdetails=1
&accept-language=pt-BR'
> * About to connect() to localhost port 80 (#0)
> * Trying 127.0.0.1... connected
> * Connected to localhost (127.0.0.1) port 80 (#0)
> > GET
/nominatim/reverse.php?format=xml&lat=-34.612869&lon=-58.4459789&zoom=18&addressdetails=1
&accept-language=pt-BR HTTP/1.1
> > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7
NSS/3.13.6.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> > Host: localhost
> > Accept: */*
> >
> < HTTP/1.1 200 OK
> < Date: Thu, 17 Apr 2014 17:25:52 GMT
> < Server: Apache
> < Access-Control-Allow-Origin: *
> < Access-Control-Allow-Methods: OPTIONS,GET
> < Cache-Control: max-age=604800
> < Expires: Thu, 24 Apr 2014 17:25:52 GMT
> < Vary: Accept-Encoding
> < Content-Length: 848
> < Connection: close
> < Content-Type: text/xml; charset=UTF-8
> <
> <?xml version="1.0" encoding="UTF-8" ?>
> <reversegeocode timestamp='Thu, 17 Apr 14 17:25:52 +0000'
attribution='Data © OpenStreetMap contributors, ODbL 1.0.
http://www.openstreetmap.org/copyright'
querystring='format=xml&lat=-34.612869&lon=-58.4459789&zoom=18&addressdetails=1&
;accept-language=pt-BR'>
> * Closing connection #0
> <result place_id="94428833" osm_type="way" osm_id="155495129"
ref="Felipe Vallese" lat="-34.6134138" lon="-58.4461716">Felipe Vallese,
Caballito, Ciudad Autónoma de Buenos Aires, C1414DLC,
Argentina</result><addressparts><road>Felipe
Vallese</road><suburb>Caballito</suburb><city_district>Caballito</city_district><city>Ciudad
Autónoma de Buenos Aires</city><state>Ciudad Autónoma de Buenos
Aires</state><postcode>C1414DLC</postcode><country>Argentina</country><country_code>aq</country_code></addressparts></reversegeocode>
--
Ticket URL: <https://trac.openstreetmap.org/ticket/5157#comment:1>
OpenStreetMap <http://www.openstreetmap.org/>
OpenStreetMap is a free editable map of the whole world
More information about the Geocoding
mailing list