How can I select multiple ways by their OSM id using the overpass API?

[out:json];way(104178011);way(18916837);out tags;

The above query only includes the data about the second way. Link.

asked 31 Jul '15, 16:07

CrazyDave2345's gravatar image

CrazyDave2345
10446
accept rate: 0%


For those arriving here via an internet search, this is quicker way to do it now:

 [out:json];way(id:104178011,18916837);out tags;
permanent link

answered 22 Jul '18, 14:16

DaveF's gravatar image

DaveF
1.2k526179
accept rate: 0%

Found it for myself this way: [out:json];way(104178011);out tags;way(18916837);out tags;

permanent link

answered 31 Jul '15, 16:36

CrazyDave2345's gravatar image

CrazyDave2345
10446
accept rate: 0%

1

Another solution is to use a union, using parentheses:

(way(104178011);way(18916837););

Not important for simple output, but unions are useful for more complicated scripts.

(31 Jul '15, 17:59) maxerickson

@macerickson Yeah its more formal and stuff.

(31 Jul '15, 22:16) CrazyDave2345
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:

×65
×49

question asked: 31 Jul '15, 16:07

question was seen: 8,929 times

last updated: 22 Jul '18, 14:16

powered by OSQA