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

I have a server running Nominatim 2.1 with data downloaded from http://download.geofabrik.de/ and I noticed that on many occasions, the nominatim on my server is returning wrong city names. Sometimes, it's wrong AND also different from results from nominatim on nominatim.openstreetmap.org.

I also noticed that when the return city name is wrong, it often gets the city name from the county it's in. For instance, if the county name is "Santa Clara County", sometimes the city is incorrectly returned as "Santa Clara" (when it should've been "San Jose"). Below are examples where the returned city name is incorrect.

Example 1 - wrong city (should've been "San Jose"):

{"place_id":"7866664",
"licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright",
"osm_type":"way",
"osm_id":"8965496",
"lat":"37.3175321691594",
"lon":"-121.788455885124",
"display_name":"D'Amico Drive, Santa Clara, Santa Clara County, California, 95148, United States of America",
"address":{
    "road":"D'Amico Drive",
    "city":"Santa Clara",
    "county":"Santa Clara County",
    "state":"California",
    "postcode":"95148",
    "country":"United States of America",
    "country_code":"us"}
}

Perhaps even more mind-boggling is the fact that sometimes, not only is the returned city wrong, but also different from the results from OSM nominatim.

Example 2 - wrong city, and different results than nominatim.openstreetmap.org

My nominatim:

{"place_id":"22439557",
"licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright",
"osm_type":"way",
"osm_id":"60691604",
"lat":"37.3963095743164",
"lon":"-121.928365877892",
"display_name":"Zanker Road, Santa Clara, Santa Clara County, California, 95134, United States of America",
"address":{
    "road":"Zanker Road",
    "city":"Santa Clara",
    "county":"Santa Clara County",
    "state":"California",
    "postcode":"95134",
    "country":"United States of America",
    "country_code":"us"}
}

OSM nominatim:

{"place_id":"55231842",
"licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright",
"osm_type":"way",
"osm_id":"60691604",
"lat":"37.4026925","lon":"-121.9337568",
"display_name":"Zanker Road, Alviso, San Jose, Santa Clara County, California, 95134, United States of America",
"address":{
    "road":"Zanker Road",
    "suburb":"Alviso",
    "city":"San Jose",
    "county":"Santa Clara County",
    "state":"California",
    "postcode":"95134",
    "country":"United States of America",
    "country_code":"us"}
}

Why is it returning the wrong city name? (everything else seems to be correct). Also, why are my results sometimes different from OSM nominatim? Do they use a different nominatim? or do they use different data?

Thanks in advance.

asked 04 Dec '13, 19:52

baekacaek's gravatar image

baekacaek
176121317
accept rate: 0%

edited 04 Dec '13, 19:53


Nominatim wrongly matches 'Santa Clara' from the tiger:county tag against the city instead of the county because the county is called 'Santa Clara County'. Quick-fix is to make sure that the place node of the county (which by convention comes without the County suffix) is included as a member label in the county relation, like that. Proper fix would be to resolve the issue in Nominatim but it might take a while to get that implemented.

If you run your own instance, you have to force an update of Santa Clara county as described in the comment of this question after the changes have been applied.

Slightly longer explanation:

Nominatim collects for each object a number of potential address parts from interesting tags, among them addr:* tags and tiger:county. Problem is that it only retains the name not the type of object (a legacy from the days of the is_in tag). When collecting the places for the address it gives a slight preference to those that match exactly with any of these names. Most of the times that does the right thing but the County suffix confuses Nominatim. It really needs the county name without suffix to get the exact match. Adding the place node as a label to the relation will resolve exactly that. The suffix-less name is taken from the place node and will provide the exact match.

permanent link

answered 05 Dec '13, 15:30

lonvia's gravatar image

lonvia
6.2k25789
accept rate: 40%

edited 06 Dec '13, 14:49

Your answer
toggle preview

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:

×710
×689

question asked: 04 Dec '13, 19:52

question was seen: 4,518 times

last updated: 06 Dec '13, 14:49

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