Opened 5 years ago

Closed 5 years ago

#5157 closed defect (fixed)

Argentina country_code abbreviation is wrong

Reported by: jenciso Owned by: geocoding@…
Priority: minor Milestone:
Component: nominatim Version: 2.0
Keywords: Cc:

Description

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@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&amp;lat=-34.612869&amp;lon=-58.4459789&amp;zoom=18&amp;addressdetails=1&amp;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>

Change History (1)

comment:1 in reply to:  description Changed 5 years ago by andersg

Resolution: fixed
Status: newclosed

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:

//for each country
update placex set indexed_status = 2 where place_id = <country place_id>;

./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):

//for each country
select place_force_update(<country place_id>);

./utils/update --index --index-instances 2

/Anders

Replying to 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@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&amp;lat=-34.612869&amp;lon=-58.4459789&amp;zoom=18&amp;addressdetails=1&amp;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>

Last edited 5 years ago by andersg (previous) (diff)
Note: See TracTickets for help on using tickets.