0

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

gboeing
1366613
accept rate: 0%


One Answer:
1

Take a look at the union operator:

http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Union

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

maxerickson
11.4k1075161
accept rate: 30%

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

(29 Sep '16, 03:18) gboeing

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:

×377
×294
×248
×139
×68

question asked: 28 Sep '16, 17:03

question was seen: 3,887 times

last updated: 29 Sep '16, 03:18

powered by OSQA