I'm looking for the correct way to query point/polygon elements that are
name=*
but neither tagged asamenity=school
andbuilding=school
tags; and- elements tagged as
building=school
but without a parent polygon that are tagged asamenity=school
(to mark the school grounds)
I expect to see a list of nodes or ways that are tagged as building=school
, but are not inside a closed way tagged as amenity=school
. The purpose of the query is for Q&A of school-related elements in our region.
The following is the code I use to get the initial elements I'm interested in:
[out:json]
[timeout:25];
(
node
[name ~ "^.school.*$",i]["building"="school"]["amenity"!~"."]({{bbox}});
way
[name ~ "^.school.*$",i]["building"="school"]["amenity"!~"."]({{bbox}});
);
//
// how to get parent poly for each resulting element?
//
// print results:
out body;
>;
out skel qt;
amenity=school
always have aname=*
tag? If not, you cannot solve this with the official Overpass installation at this time.!~
in the Overpass QL documentation.amenity=school
may, or may not be present. and we hope to improve the data where only buildings are tagged as schools, but not as as amenities.amenity=school
closed way always have aname=*
tag. Now you replied that even theamenity=school
may not be present. How should you determine, which closed ways are relevant then? Can you enhance your question a bit and provide some concrete examples? Also, I'd recommend to discuss this topic on the tagging mailing list first and get some feedback, if this kind of data improvement is generally accepted procedure.name=*
,building=school
They sometimes forget to add a polygon for the school grounds, thinking that the building tag is sufficient. So the parent polygon for a school building, may or may not exist. I'm hoping to query for buildings tagged as schools, but without parent polygons that should've one marked asamenity=school
. By the way, it's also possible to have buildings without school grounds in highly urban areas. Sorry for the inadequate explanation. English is not my first language.