Hello!
When we type a street name in the Search area of http://www.openstreetmap.com/, then we can get a list of address, which are the cities including the typed street.
Does it mean that OSM has such a **database **as shown below, based on which OSM service can find the corresponding city and country of a given street name, right?
CountryName, CityName, StreetName
Sweden, Stockholm, Vasagatan
Sweden, Stockholm, Sveavägan
... ... ...
Sweden, Uppsala, Kungsgatan
… … …
I am not sure whether this kind of dataset exists, and the accessibity of it. If I want to find out the city and country a named street belongs, how can I do it based on my own algorithm and OSM dataset? (In OSM data, the name tag does not include the city name as well as country name)
Similarly, given a point (latitude, longitude), how can I efficiently find out which street the point is closest to? In doing this, we need a spatial index for OSM data. For instance, we need to know how many cities a country has, and the boundary of every city. Based on these, we can position the point in a city according to the city’s boudary, and then we can find the street closest to the given point quickly. Am I right? If so, does such a dataset exist?
CountryName, CityName, Boundary
Sweden, Stockholm, ([x0 y0], [x1 y1], [x2 y2] ...)
Sweden, Uppsala, ([x0 y0], [x1 y1], [x2 y2] ...)
... ... ...
Many thanks in advance!
Xintao