I want to run following Overpass QL query in order to get way IDs of all buildings inside a polyon:
way(poly:"50.7 7.1 50.7 7.2 50.75 7.15")[building];
>;
out ids;
Since I'm using the osm-common library, I need to convert this script to Overpass XML. I did it using the convert form here.
The result:
But when I run it, I get node IDs, not way IDs.
The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.
...
How should I modify the Overpass XML query in order to get way IDs of the buildings?
Answer
When I manually enter a Query for ways Overpass turbo suggests an auto repair so as to also get nodes for the way. This then amounts to
way(poly:"50.7 7.1 50.7 7.2 50.75 7.15")["building"];
/*added by auto repair*/
(._;>;);
/*end of auto repair*/
out body;
see http://overpass-turbo.eu/s/1q1 .
Change out body
to out ids
if you really only want way IDs, but without the information which node belongs to which way.
No comments:
Post a Comment