NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I would like to extract, with Overpass Turbo, all members of a specific route relation that do not have a specific key (in my case, all ways that lack a surface tag).

asked 29 Sep '15, 16:08

voschix's gravatar image

voschix
6344
accept rate: 0%

edited 29 Sep '15, 20:19

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554


We had the exact same question in the German forum thread "OverpassTurbo for Dummies" .

Here's how query should look like. Please adjust the relation id selection as needed.

relation(398874);way(r)[surface!~"."];out;>;out skel;

Try it in Overpass Turbo: http://overpass-turbo.eu/s/bJg

permanent link

answered 29 Sep '15, 17:28

mmd's gravatar image

mmd
5.7k15388
accept rate: 37%

edited 29 Sep '15, 17:31

that's great - I often thought about the same! … And how to get a refinement of this? e.g. only tracks when searching for existence of tracktype? ;-) I tried relation(398874);way(r)["highway"="track"][tracktype!~"."];out;>;out skel; but that runs much much longer (until I cancel).

(29 Sep '15, 20:29) aseerel4c26 ♦
3

That's also possible with QL, but the query needs to be rewritten a bit due to a very expensive evaluation sequence:

relation(398874);way(r);way._["highway"="track"][tracktype!~"."];out;>;out skel;

(29 Sep '15, 20:47) mmd
1

great, thanks! I think this kind of refinement is often useful for those queries. I need to learn this language! :-)

(29 Sep '15, 21:19) aseerel4c26 ♦

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:

×228
×128
×22

question asked: 29 Sep '15, 16:08

question was seen: 2,372 times

last updated: 29 Sep '15, 21:19

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum