Hi,

I'd like to run this query

way[building]({{bbox}})->.a; foreach .a ( way.a(around:400); way._(if:count(ways) == 1); out center; );

I found here but using {{geocodeArea:"Burlats"}} or {{geocodeArea:"Boissezon"}} or {{geocodeArea:"Noailhac"}} instead of the {{bbox}}parameter....It seems I'm doing something wrong because

way[building]({{geocodeArea:"Boissezon"}})->.a; foreach .a ( way.a(around:400); way._(if:count(ways) == 1); out center; ); just get me a syntax error message :)

Thanks

asked 30 Nov '17, 20:56

Serpico's gravatar image

Serpico
4112
accept rate: 0%


The Overpass Turbo shortcut replaces the geocodeArea with an area query, which is not valid syntax for specifying the area in the way query.

The fix is to save the area result to a set first:

{{geocodeArea:"Boissezon"}}->.searchArea;
way[building](area.searchArea)->.a;
foreach .a (
  way.a(around:400);
  way._(if:count(ways) == 1);
  out center;
);

An easy way to recall the structure of such queries is to put something like amenity=* in Toledo into the Wizard.

permanent link

answered 01 Dec '17, 11:42

maxerickson's gravatar image

maxerickson
11.0k1075155
accept rate: 30%

Your answer
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:

×214
×125
×119

question asked: 30 Nov '17, 20:56

question was seen: 1,469 times

last updated: 01 Dec '17, 11:42

powered by OSQA