NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hello. I'm new to here.

I've set up my own Nominatim server on a Ubuntu server and imported the full planet OSM file into the database. Map rendering is fine, however, the reverse geocoding result was very strange, in some cases the result returned from my local server is different to the Nominatim webpage. Of course, the result from Nominatim is correct.

For example: http://MY_SERVER/nominatim/reverse?format=xml&lat=22.300348&lon=114.167846&zoom=18&addressdetails=1&accept-language=en


My server returns: <reversegeocode timestamp="Sat, 04 May 13 14:42:00 +0000" attribution="Data © OpenStreetMap contributors, ODbL 1.0. &lt;a href=" http:="" www.openstreetmap.org="" copyright""="">http://www.openstreetmap.org/copyright" querystring="format=xml&lat=22.300348&lon=114.167846&zoom=18&addressdetails=1&accept-language=en"> <result place_id="12826225" osm_type="node" osm_id="1187352818" ref="China Hong Kong City" lat="22.3009605" lon="114.1676224"> China Hong Kong City, Canton Road, Tsim Sha Tsui, Yau Tsim Mong District, New Territories, Hong Kong </result> <addressparts> <parking>China Hong Kong City</parking> <road>Canton Road</road> <suburb>Tsim Sha Tsui</suburb> <city>Yau Tsim Mong District</city> <county>New Territories</county> <state>Hong Kong</state> <country>Hong Kong</country> <country_code>hk</country_code> </addressparts> </reversegeocode>

The Nominatim server returns: <reversegeocode timestamp="Sat, 04 May 13 14:42:08 +0000" attribution="Data © OpenStreetMap contributors, ODbL 1.0. &lt;a href=" http:="" www.openstreetmap.org="" copyright""="">http://www.openstreetmap.org/copyright" querystring="format=xml&lat=22.300348&lon=114.167846&zoom=18&addressdetails=1&accept-language=en"> <result place_id="12824996" osm_type="node" osm_id="1187352818" ref="China Hong Kong City" lat="22.3009605" lon="114.1676224"> China Hong Kong City, Canton Road, Tsim Sha Tsui, Yau Tsim Mong District, Kowloon, Hong Kong </result> <addressparts> <parking>China Hong Kong City</parking> <road>Canton Road</road> <suburb>Tsim Sha Tsui</suburb> <city>Yau Tsim Mong District</city> <county>Kowloon</county> <state>Hong Kong</state> <country>Hong Kong</country> <country_code>hk</country_code> </addressparts> </reversegeocode>
The COUNTY value is different and "Kowloon" is the correct one.

I tried to import it from OSM/PBF file, the results are same.

I strictly went through the installation procedure (http://wiki.openstreetmap.org/wiki/Nominatim/Installation) and tried to install it with Nominatim 2.0.1 and the GIT version, results are still same...

Is there anyone have any idea about this? If anyone is able to help me troubleshoot, I can give you root access to my server.

Thank you!

asked 04 May '13, 16:21

sa9496's gravatar image

sa9496
11223
accept rate: 0%

Oh yes.. I found the New Territories boundary is different:

My server: http://54.225.111.130/nominatim/details.php?place_id=113082147
Nominatim: http://nominatim.openstreetmap.org/details.php?place_id=98186275

Does it actually mean that my data is older than what Nominatim is using? Mine was dated 2013-04-23 (few days before I downloaded the planet file) and the Nominatim one was 2013-05-04 (today)

Do you think I can have it fixed if I update my database?

(04 May '13, 18:07) sa9496

This is a data problem: I suspect that your version of the planet is newer than that used by Nominatim (at least for Kowloon).

It is always worth using the detail view of Nominatim to see what it thinks the boundaries of polygons actually are. The current boundaries for Kowloon and New Territories are here and here (as these use internal Nominatim Ids, these links may fail in which case chose the links on the name and select the details link in Nominatim). You should check that the boundaries for these places are the same on your server.

In fact the boundary of Kowloon was has been changed in several changesets recently - see the history of the relation here - and it is no longer a closed polygon as shown by inspecting the relation here.

In addition the relation covering the New Territories has similarly lost its hole containing Hong Kong Island and Kowloon.

Once these problems have been fixed and your Nominatim instance updated I would expect that you will get the geocoding results you expect!

permanent link

answered 04 May '13, 17:06

SK53's gravatar image

SK53 ♦
28.1k48268433
accept rate: 22%

1

I have now fixed the admin polygons for Kowloon, Hong Kong Island and New Territories which had been broken.

(04 May '13, 17:27) SK53 ♦

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×133
×30
×2

question asked: 04 May '13, 16:21

question was seen: 5,228 times

last updated: 04 May '13, 19:05

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum