[out:json][timeout:30];
// --when areas have duplicate names given the world has a limited amount of uniquely named places
area[name="Western Cape"] ->.b;
// -- target area ~ can be way or relation
relation(area.b)[name="University Estate"];
map_to_area -> .a;
// I want all buildings
(way['building'](area.a);
// and relation type=multipolygon ~ to removed courtyards from buildings
relation["building"]["type"="multipolygon"](area.a);
);
out body;
>;
out skel qt;
How would I restrict the call to return no more than 2500 buildings please.
So if I change:
relation(area.b)[name=“University Estate”]; // will return ~306 buildings
to
relation(area.b)[name=“Woodstock”]; // will return ~3700 buildings
I want the call to say; No. limit exceeded.
How would I restrict the call to return no more than 2500 buildings please?
Unsure what you want to do. Your problem is fundametally with way['building'](area.a); getting everything in the area.
Check for building= on members:
rel(area.a)[type=multipolygon][building]->.all;
way(r.all)[building];
rel.all(bw);
out geom;
Remember they aren’t always wrong. Can be valid reuse.
Specifically for the question itself, you should only use out body 2500; , or replacing with out geom 2500; without lines below; or separate out meta 2500; in out:xml followed by >; out meta; . This counts only building= , not node and wy members.
I am grateful; thank you @Kovoschiz.
Tell me please. If I use:
[out:json][timeout:30];
// --when areas have duplicate names given the world has a limited amount of uniquely named places
area[name=“Western Cape”] ->.b;
// – target area ~ can be way or relation
relation(area.b)[name=“Woodstock”];
map_to_area → .a;
// I want all buildings
(way’building’;
// and relation type=multipolygon ~ to removed courtyards from buildings
relation[“building”]“type”=“multipolygon”;
);
out…
How would I determine the count / amount of polygons returned please?