I'm trying to fetch house locations from streets that match a query search:
At this point, I would love to be able to get the same amount of information that can be retrived by nominatim when query for a 'ways' that match addr:street 'relation' value like this So, question is, How can I extend query to retrieve info about buildings on the same street ? Thanks asked 02 Jun '13, 17:30 inean |
Please explain what you mean by "fetch relations of which matched ways are parent of". I suspect that you may have a misconception here about how buildings are mapped; they do not usually have a direct relationship to a nearby street, but instead they just carry the street name in their
addr:street
tag. There is an "associatedStreet" relation but it is not widely used.Ok, I've rewritten question a bit, hope this helps. Said that, Nominatim says that there's some kind of parent-child relation between 'relations' with 'tags' 'type' = 'place:house' and 'ways'. What I want is to get that info with overpass.
I'm trying to implement some kind of adapatative search with overpass to retrieve streets that matchs an user query. At some point, it would be interesting that, with house number info, get coordinates of that building. The main reason to not use Nominating is that I need all available candidates around user coordinates and within a radius.
Nominatim does the "parent-child relation" via the name of the street, it's a simple overpass query you almost did already.
And getting a coordinate for a building is getting the geometry and calculation some middle point.
I agree with Frederik, I can't guess what you really want to do.