Dear all,

I want to query for all buildings that contain at least one node with the tag "country=EU" and "office=government".

I tried so far:


Test on overpass: (courtesy of mmd)

However, this does not work as areas are not always updated (see discussion with mmd and on github). The results are not complete and not reliable.

Then, I tested to achieve this with the around operator.

// fetch area “Brussels” to search in
// gather results
// print results
out body;
out skel qt;

Test on overpass:

However, here I do not know how to choose the distance of the around operator. The results are either incomplete or I get false positives, i.e. also neighbouring buildings.

Is there a solution to get the surrounding building of a set of nodes with specific tags?

asked 09 Sep '19, 18:48

rriemann's gravatar image

accept rate: 0%

Is it maybe possible to have a foreach loop over all government office and use their geographical location to get all elements on that point (it's possible with the context menu query) and then filter out one building?

(10 Sep '19, 09:17) rriemann
(20 Sep '19, 22:49) rriemann

Is there maybe a work around in a different language? With some python/javascript lib?

(07 Oct '19, 21:19) rriemann

Has a nice code example that can be useful:

(09 Nov '19, 22:22) rriemann

This is my best take so far:

// get EU governmental offices nodes
        // get all enclosures from EU governmental offices
        .offices is_in->.enclosing;
        // limit result to buildings

.officebuildings out geom;
.offices out meta;

Run in overpass turbo:

The problem is yet that some buildings are not marked (most of them?).

permanent link

answered 04 Nov '19, 18:53

rriemann's gravatar image

accept rate: 0%

Your answer
toggle preview

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: 09 Sep '19, 18:48

question was seen: 1,472 times

last updated: 09 Nov '19, 22:22

powered by OSQA