[GIS] How Nominatim calculates addresses

nominatimopenstreetmaposmosis

I have imported OpenStreetMap data for the country Switzerland via osmosis in my MySQL database.

Now I want to look for a specific address in that database, but I can't find a way to get the whole address (street, postcode, town ..).

For example, the address I'm talking about is: Street: Archstrasse, town: Grenchen, postcode: 2540, county: Amtei Solothurn-Lebern, country: Schweiz.

<!-- language: lang-sql -->
select * from current_way_tags where way_id = 162530695;> &nbsp;

+-----------+----------+-------------+&nbsp;

| way_id    | k        | v           |&nbsp; 

+-----------+----------+-------------+&nbsp;

| 162530695 | cycleway | lane        |&nbsp; 

| 162530695 | highway  | primary     |&nbsp;

| 162530695 | name     | Archstrasse |&nbsp;

| 162530695 | ref      | 5           |&nbsp;

+-----------+----------+-------------+&nbsp;

Best Answer

Take the link from iant's comment and click on details. On the database side, Nominatim calculates an address hierarchy. It does this by looking at address tags on the object, associatedStreet relation on the object if present, boundary relations containing the object in question, and places containing the object or being near it. And maybe more.

More background information:

Don't forget that there are other OSM-based search engines. Some of them are based on Nominatim, others aren't.

Related Question