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

All levels of address detail for Nominatim reverse service

0

In the documentation for the reverse service of Nominatim I just see partly some levels of the address. I see some other parts further in the example for geojson.

zoom    address detail
3   country
5   state
8   county
10  city
14  suburb
16  major streets
17  major and minor streets
18  building

What are the 18 levels of details for the address field, when we use the reverse API of Nominatim?

asked 07 Mar '21, 13:45

Jo%C3%A3o's gravatar image

João
31226
accept rate: 0%

edited 07 Mar '21, 13:45


One Answer:

4

The other levels have no names. From the source code at https://github.com/osm-search/nominatim-ui/blob/master/src/lib/helpers.js#L129

const aZoomLevels = [ /* 0 */ 'Continent / Sea', /* 1 */ '', /* 2 */ '', /* 3 */ 'Country', /* 4 */ '', /* 5 */ 'State', /* 6 */ 'Region', /* 7 */ '', /* 8 */ 'County', /* 9 */ '', /* 10 */ 'City', /* 11 */ '', /* 12 */ 'Town / Village', /* 13 */ '', /* 14 */ 'Suburb', /* 15 */ '', /* 16 */ 'Street', /* 17 */ '', /* 18 */ 'Building', /* 19 */ '', /* 20 */ '', /* 21 */ '' ];

The number 1-18 are used because those are map zoom level. Map zoom 0,1,2 usually show the whole world (depending on size of the monitor), while 18 was the maximum zoom on the OpenStreetMap. These days the maximun zoom is 21.

answered 07 Mar '21, 13:56

mtmail's gravatar image

mtmail
4.8k1574
accept rate: 27%

Thank you, but I need to know what are really the exact object fields, such as seen here. For example house_number, road, county, etc.

(07 Mar '21, 14:09) João

Address levels for ranking are a bit more complex (https://nominatim.org/release-docs/develop/develop/Ranking/). https://github.com/osm-search/Nominatim/blob/master/settings/address-levels.json lists the most common but they're mapped to different ranks depending on country. https://github.com/OpenCageData/address-formatting/blob/master/conf/components.yaml lists more, and still that list isn't complete because OpenStreetMap data can contain every tag, a restaurant will have the field name 'restaurant', too, so there is likely over 1000 possible field names. The components.yaml covers the most common, usually everything else can be seen as the name of a place.

(07 Mar '21, 14:16) mtmail
(07 Mar '21, 15:05) mtmail

Source code available on GitHub .