NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I need to display school building. i have made the outer area of school and tagged it as amenity=school. there are some buildings inside the area, i need the data of the buildings.

using overpass api's around clause i can get them but it also gives some buildings that are outside the school. i am trying to use the area or pivot clause, but the results are empty. the overpass query is

(way({{bbox}})['amenity'~'school|college|hospital|clinic'];node(w);)->.boundary;(way(area.boundary);node(w););out skel;

the test area

it should be like this

P.S. all the building have been tagged as building=school, which gives a shorter query. but i need to use the area clause because they might not be tagged properly in other places.

asked 08 Apr '13, 19:35

amritkarma's gravatar image

accept rate: 11%

The areas in Overpass API are generated for ways with specific tags only, for example for ways with a name and "area=yes" or a name and any value of "landuse".

I would recommend to retag way 142778170 with "amenity=school" and "area=yes" instead of "area=school". Then Overpass API would generate in the next run an area for that campus. This may take some hours, the timestamp "areas" in the meta tag of the returned data must become newer than your edit. Then you can select the buildings with


like in this example.

permanent link

answered 11 Apr '13, 06:20

Roland%20Olbricht's gravatar image

Roland Olbricht
accept rate: 36%

does it work for amenity=college,hospital,clinic? it has been tagged as amenity = college

(11 Apr '13, 07:45) amritkarma

Looks like it works for hospitals and schools, but not for colleges and clinics. Is there any workaround for colleges and clinics.

(11 Apr '13, 09:12) amritkarma

Please try again. I have enlarged the scope of the areas, at least on

(16 Apr '13, 20:43) Roland Olbricht

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 08 Apr '13, 19:35

question was seen: 6,307 times

last updated: 16 Apr '13, 20:43

NOTICE: is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum