Hi All, I am quite new to OSM and am looking for help regarding gettting all the elements assoicated with a particular address using the Overpass API. So far I have managed to get the house number, street name and city of a particular area, however when I search a specific address on Nominatim, I see other elements associated with the address that are not appearing in my query. Certain elements associated with the address are tagged under place and boundary and I would like them included as a full address as listed under the address table in the following link - https://nominatim.openstreetmap.org/details.php?place_id=137891179 Any help would be greatly appreciated. Thank you in advance EDIT: Current (badly written) query: [out:csv(::"id","addr:housenumber","addr:street","addr:postcode","addr:city", relation, "boundary:administrative")][timeout:25] [bbox:{{bbox}}]; ( node["addr:housenumber"]; way["addr:housenumber"]; relation["addr:housenumber"]; / node[name]; way[name]; relation[name];/ node[place]; way[place]; relation[place]; node["boundary:administrative"]; way["boundary = administrative"]; relation["boundary = administrative"]; ); // print results out body;
asked 11 Feb '18, 11:04 rThornton93 |
Nominatim can offer the full address hierarchy because it computes it upon loading the data into the database. Overpass, on the other hand, has to try and resolve your queries ("what admin_level=2 boundary is this location in") at runtime and hence takes vastly more computing resources. Even if you find the query to do this, running it more than once or twice a day would really consider abuse of the Overpass platform given that Nomniatim is so much more efficient in giving you the response you are looking for. answered 11 Feb '18, 13:56 Frederik Ramm ♦ Hi Frederik, Thank you for your prompt response. Based on what you have said, would it be possible for me to get the information I need by querying Nomniatim directly - if this is even possible? Thank you in advance for your help.
(11 Feb '18, 14:49)
rThornton93
|
You can retrieve boundaries from Overpass-API using the is_in query, but Overpass API does not support annotating the individual addresses with the information. So you'd end up implementing that aspect of Nominatim locally. Nominatim has an api for retrieving the address information for a given coordinate. You'd have to call that api for each location you wanted information about. Make sure to follow the use policy if you use the public server. answered 11 Feb '18, 21:02 maxerickson |