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

Hi. I am experiencing challenges querying buildings on a campus via overpass with

[out:json][timeout:30];
area[name='Cape Peninsula University of Technology (Bellville Campus)']->.a;
(
  (
    // I want all buildings
    way[building](area.a);

    // plus every building:part
    way["building:part"](area.a);
  // and multipolygon relation ¬ to represent buildings with courtyards correctly
    relation["building"]["type"="multipolygon"](area.a);
  );
-
  // excluding buildings with relation type=building role=outline ¬ I want to correct form/height of the part
  (
    // for every way in the input set select the relations of which it is an "outline" member
    rel(bw:"outline")["type"="building"];
    // back to the ways with role "outline"
    way(r:"outline");
  );
);
out body;
>;
out skel qt;

three buildings are not being harvested correctly https://www.openstreetmap.org/relation/12469713, https://www.openstreetmap.org/relation/12442311 and https://www.openstreetmap.org/relation/12445158 are building:parts with a courtyard (multipolygon relation role=inner) that exist within an outline type=building relation which contain the same courtyard. (i.e.: the courtyard is inside a building:part and the role=outer is coming with the query even though I’ve excluded the outline).

I want the form/shape and height of the building:part and not the outline; while being mindful of every other structure on the campus. How do I exclude the relation type=multipolygon role=outer when type=building role=outline already exists for a structure? Have I created the relations incorrectly? Your help is appreciated.

asked 22 Mar '21, 07:24

arkriger's gravatar image

arkriger
155131421
accept rate: 0%

It is now obvious the fault lies with how I tagged these features.

If we focus on Relation: 12469713 I don't know where the relation type=building role=outline goes.

I don't know.

(07 Aug '21, 16:38) arkriger

building:part multipolygon relations were not accounted for - when a building:part has a courtyard.

adding: relation["building:part"]["type"="multipolygon"](area.a); to the query (line 10) fixes it.

(31 Aug '21, 16:13) arkriger

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×252
×228
×132
×128

question asked: 22 Mar '21, 07:24

question was seen: 1,986 times

last updated: 31 Aug '21, 16:15

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