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

Is it possible to combine an id-querywith some sort of has-kv ?

< osm-script>
   < id-query ref="3300434" type="relation" />
   < recurse type="relation-relation" />  
   < recurse type="relation-relation" />  
   < recurse type="relation-node" />  
< print/>
< /osm-script>

I have this code which list each nodes of a transport network. I'd like to get only the ones with < tag k="public_transport" v="stop_position"/> and not the ones with < tag k="public_transport" v="platform"/>

asked 12 Feb '14, 11:49

Kyro's gravatar image

Kyro
1216713
accept rate: 0%


Yes, you can wrap a clause with a <query>-tag to do further filtering:

…
<query type="node">
  <recurse type="relation-node" />
  <has-kv k="public_transport" v="platform" />
</query>
…

http://overpass-turbo.eu/s/2uI

permanent link

answered 12 Feb '14, 12:05

tyr_asd's gravatar image

tyr_asd
1.2k51927
accept rate: 64%

edited 12 Feb '14, 12:05

1

That's it, thanks !

(12 Feb '14, 12:07) Kyro

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:

×483

question asked: 12 Feb '14, 11:49

question was seen: 3,009 times

last updated: 12 Feb '14, 12:07

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