Dear all,

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

I tried so far:

node({{bbox}})[country=EU][office=government];
is_in;
(way[building](pivot);>;);out;

Test on overpass: http://overpass-turbo.eu/s/MaJ (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.

[out:json][timeout:25];
// fetch area “Brussels” to search in
{{geocodeArea:Brussels}}->.searchArea;
// gather results
node[office=government][country=EU](area.searchArea)->.offices;
( 
  way[building=yes](around.offices:8);
);
// print results
out body;
(._;>;);
out skel qt;

Test on overpass: http://overpass-turbo.eu/s/Mbp

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, 18:48

rriemann's gravatar image

rriemann
111
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 openstreetmap.org context menu query) and then filter out one building?

(10 Sep, 09:17) rriemann
Be the first one to answer this question!
toggle preview

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:

×350

question asked: 09 Sep, 18:48

question was seen: 53 times

last updated: 10 Sep, 09:17

powered by OSQA