This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Buildings from multiple campuses with the same operator

1

Hi; I am experiencing challenges harvesting building from a university with many campuses. The campuses are linked with a relation type=site and tagged amenity=university and the sites themselves are named uniquely while the operator= is the same.

[out:json];

area[name="Western Cape"]->.b;
way(area.b)[operator='Cape Peninsula University of Technology'];
map_to_area -> .a;

out body;
>;
out skel qt;

Executes correctly and returns the sites but

[out:json];

area[name="Western Cape"]->.b;
way(area.b)[operator='Cape Peninsula University of Technology'];
map_to_area -> .a;

way["building"](area.a);

out body;
>;
out skel qt;

does not return isolated buildings. Only buildings that are enclosed within University Grounds are returned and buildings not on "traditional" grounds are excluded - this is even though isolated buildings are University Grounds. How must the query change to accommodate isolated buildings not on "traditional" University Grounds? Are the Tags effective or should these change? Must University Grounds be a separate area bigger than features - such as building - it contains?

asked 25 Feb '21, 15:58

arkriger's gravatar image

arkriger
155131421
accept rate: 0%

edited 23 Mar '21, 11:20

Please advise if I should open a separate question:

I believe the 'amenity=university' on each campus including the site relation is unnecessary. I should delete the 'amenity=university' on each campus and leave only the 'amenity=university' on the relation.

Is this correct?

(02 Apr '22, 09:19) arkriger

No I would not do that site relations are relatively uncommon & therefore not often consumed (for instance I don't believe the main Carto-OSM render consumes them, in which case all labelling of Western Cape sites would cease).

(02 Apr '22, 13:17) SK53 ♦

One Answer:

0

Many of the buildings are mapped as multipolygons so you need to include relation(area.a)["building"] too. I'm seeing isolated buildings mapped as ways, such as 253456002

answered 02 Apr '22, 13:21

SK53's gravatar image

SK53 ♦
28.1k48268433
accept rate: 22%

[out:json][timeout:30];

(area[name="Western Cape"] ->.b;
way(area.b)[operator="Cape Peninsula University of Technology"];
map_to_area -> .a;
 way['building'](area.a);
 relation["building"]["type"="multipolygon"](area.a);
);
out body;
>;
out skel qt;

might do the necessary. I'll confirm at a later date. Thank you.

(02 Apr '22, 14:22) arkriger

Source code available on GitHub .