This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Why do I get the wrong city name from Nominatim?

0

I am using a java library which uses Nominatim to extract the city names for a given latitude and longitude. I am looking for Node with id 108042 but I get "London Borough of Camden" as the city which is wrong. I am wondering why it happens.

I even tried this link to ensure that the problem is not with the third party library that I am using but it also gives me the same information.

asked 02 Jun '20, 10:05

Anika%20H's gravatar image

Anika H
16113
accept rate: 0%


One Answer:

4

https://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative lists what admin_level values represent in different countries. Look for United Kingdom and admin_level=8.

London is so big, everything moves up a level. London is tagged admin_level=6 (in the rest of the country that would be a district/county). The level below (boroughs) are tagged admin_level=8 (in the rest of the country that would be a city). Bouroughs are so big and self-administering they another two levels of boroughs/neighborhoods/suburbs of their own. Paris and their 20 arrodissimonts are similar and I believe New York City.

"London consists of a collection of boroughs, two of which are Cities. They are not towns" That's City of Westminster and City of London.

Nominatim currently can't set different labels based on region, here: inside London. You'd have to identify London (maybe by postcode) and apply that.

https://nominatim.openstreetmap.org/details.php?osmtype=N&osmid=108042

answered 02 Jun '20, 11:23

mtmail's gravatar image

mtmail
4.8k1574
accept rate: 27%

Source code available on GitHub .