简体   繁体   中英

overpass api - requesting any node that has tag

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;

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;

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2025 STACKOOM.COM