Given the id of a closed way which represents an area, as indicated by an "area" tag such as building=*, how can I retrieve all nodes/ways contained entirely or partially within that area from Overpass API? What I have found so far is area-query, which sounds as if it should cover this use case, and it works as expected for areas represented as multipolygons (if you remember to add the magic number 3600000000 to the id):
I've found a hint that adding 2400000000 to the id might do the trick for closed ways. However, this does not appear to work:
This example query for way 101518744 should return 1172225070 as well as other nodes, but the result is empty. Is there something I'm missing? asked 20 Mar '13, 18:40 Tordanik |
In short: an area for the given way has never been generated because the way has no name. I'm sorry that there is no immediate solution to your problem. In more detail: https://github.com/drolbr/Overpass-API/blob/master/rules/areas.osm3s contains the rules what objects are recognized as areas. In particular, ways are selected there only if they have a name and one of various other tags (including "building=yes"). This ruleset isn't a fixed law, but rather reflects the discussion on the mailing list. It is likely to be incomplete anyway. Please send a mail to talk(at)openstreetmap.org to put the discussion further. I'll then expand the list when there is consensus that this is useful. answered 21 Mar '13, 08:22 Roland Olbricht I've taken this to talk now, as you asked: Thread archive
(22 Mar '13, 20:03)
Tordanik
|
Is there some changes/news regarding this question which seems important. It would be very useful to have the possibility to make queries using for exemple ways[landuse] without name. Ex : Finding all residential buildings, all industrial buildings, etc. depending if they are included in ways with landuse=residential or landuse=industrial etc. but without any name. Most of the time, ways[landuse=residential] don't have name, then we can not use them as areas. In my use, I need categories of buildings to determine activities surfaces (buildings) on ground. (Building attractions in terms of activities/population) answered 26 Nov '13, 16:45 glider90 3
Problem localy solved for me with the installation of a local Overpass server on wich we changed rules for areas (/rules/areas.osm3s). Thanks for this usefull post.
(27 Nov '13, 13:14)
glider90
FYI: There are now two similar GitHub tickets dealing with this issue:
(21 Apr '14, 10:54)
mmd
|