Why not ask your question on the new OpenStreetMap Community Forum?


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 :)


asked 30 Nov '17, 20:56

Serpico's gravatar image

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:

foreach .a (
  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

accept rate: 32%

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](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:


question asked: 30 Nov '17, 20:56

question was seen: 7,172 times

last updated: 01 Dec '17, 11:42

powered by OSQA