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

Hi,

I'm trying to find out how to get all outer ways of a set of multipolygon relationships.

This is what my query looks like right now:

http://www.overpass-api.de/api/interpreter?data=[out:json];
relation["type"="multipolygon"](52.51,13.36,52.52,13.39);
way(r)["building"];
out qt;

It selects all building ways that are part of a multipolygon. How can I remove the ones the are set to role: "outer"?

EDIT

The last part should read: How can I remove the ones the are set to role: "inner"?

asked 26 Jul '14, 20:38

burgerer's gravatar image

burgerer
16112
accept rate: 0%

edited 27 Jul '14, 13:38


Your question is not entirely clear/ a bit of a contradiction. I guess what you're looking for is the first part of this answer. Just in case you want to remove some ways with a specific role from your result set, you can check out the second part of this answer.

In your question summary, you mentioned that only want to retrieve buildings with role outer:

relation["type"="multipolygon"](52.51,13.36,52.52,13.39) -> .relation;
way(r.relation:"outer")["building"]; 
out qt;

Overpass Turbo link 1

Then you asked "How can I remove the ones the are set to role: "outer"?"

You can use the difference operator for this purpose:

relation["type"="multipolygon"](52.51,13.36,52.52,13.39) -> .relation;
( way(r.relation)["building"]; -
  way(r.relation:"outer"); );
out qt;

Overpass Turbo link 2

BTW: Don't forget to also check out the documentation on the Wiki page

permanent link

answered 26 Jul '14, 22:00

mmd's gravatar image

mmd
5.7k15388
accept rate: 37%

edited 26 Jul '14, 22:17

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:

×483
×132

question asked: 26 Jul '14, 20:38

question was seen: 6,004 times

last updated: 27 Jul '14, 13:38

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