overpass api - requesting any node that has tag
Asked Answered
C

2

5

I was wondering if it's possible to request via overpass API "any node that has at least one tag of any kind". The only way I see right now is to sopecify all the existing tags in a huge union request (see below), or requesting nodes without the "tag filtering" at all, and getting many nodes that have no tag at all. I will appreciate if you know a better solution. Thanks!

[out:json];
(
  node
    ["name"]
    (50.6,7.0,50.8,7.3);
  node
    ["amenity"]
    (50.6,7.0,50.8,7.3);
  AND SO ON (SPECIFY ALL THE OTHER TAGS)
);
out;
Conoscenti answered 4/8, 2013 at 16:8 Comment(1)
Can you explain why you need such a strange query?Rataplan
E
8

You can achieve this by using the following query:

[bbox:{{bbox}}];node[~"."~"."];out meta;

Example: http://overpass-turbo.eu/s/4Z4

Since version 0.7.54 you can also use the following approach:

[bbox:{{bbox}}];
node(if:count_tags() > 0);
out meta;
Equilibrate answered 10/9, 2014 at 6:55 Comment(0)
R
0

As far as I can see this is not possible at the moment. However you can post-filter the data using osmfilter / osmconvert.

Rataplan answered 4/8, 2013 at 16:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.