[Geocoding] Country code for Hong Kong geocodes to "cn" instead of "hk"
Leo Orson
orsonleo3 at gmail.com
Sun Sep 2 17:32:23 UTC 2018
Thank you for the clarification.
On Sat, Sep 1, 2018 at 1:55 PM Sarah Hoffmann <lonvia at denofr.de> wrote:
> Hi,
>
> On Fri, Aug 31, 2018 at 06:28:31PM +0530, Leo Orson wrote:
> > Hello everyone,
> >
> > I tried to geocode "Hong Kong"
> > (https://nominatim.openstreetmap.org/search.php?q=Hong
> > Kong&format=json&addressdetails=1&accept-language=en), and the country
> code
> > comes out to be "cn".
>
> Nominatim takes the country code from the country the place is in
> which in this particular case is China.
>
> > But according to this list (
> > https://wiki.openstreetmap.org/wiki/Nominatim/Country_Codes), I found
> the
> > country code for Hong Kong to be "HK", and hence I believe we should be
> > getting HK instead of CN.
>
> This list just contains the codes Nominatim knows about, not where they
> are applied.
>
> > I did some research and I believe the Relation: China (270056) (
> >
> https://www.openstreetmap.org/relation/270056/history#map=6/20.056/114.675
> )
> > is the reason. Not sure how to fix this, hence thought of mailing it
> here.
>
> This is not a data error but a fundamental design issue with Nominatim
> which cannot handle overlapping countries well (also an issue with
> disputed areas). I've added the case to
> https://github.com/openstreetmap/Nominatim/issues/202
> but I'm sorry to say it is unlikely that this will get fixed any time soon.
>
> Kind regards
>
> Sarah
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/geocoding/attachments/20180902/0b6a7f84/attachment.html>
More information about the Geocoding
mailing list