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

How can I get all the nodes and ways within some polygon in a single Overpass API query? For example, I can get all the ways like this;out;) and all the nodes like this.

But how might I combine these HTTP GET requests into a single query?

asked 28 Sep '16, 17:03

gboeing's gravatar image

accept rate: 0%

Take a look at the union operator:


You will have to repeat the poly statement. Here's the poly example from the docs wrapped in a union:

  node(poly:"50.7 7.1 50.7 7.2 50.75 7.15");
  way(poly:"50.7 7.1 50.7 7.2 50.75 7.15");
  rel(poly:"50.7 7.1 50.7 7.2 50.75 7.15");
permanent link

answered 28 Sep '16, 22:04

maxerickson's gravatar image

accept rate: 32%

Thanks, yes, the wrapping parentheses were what I needed.

(29 Sep '16, 03:18) gboeing
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: 28 Sep '16, 17:03

question was seen: 6,068 times

last updated: 29 Sep '16, 03:18

powered by OSQA