[英]How to query overpass turbo by a tag with any value?
Catalonia has 42 'counties' which we call "comarques" ( example ).加泰罗尼亚有 42 个“县”,我们称之为“comarques”(示例)。 I am trying to retrieve its boundaries from OSM using overpass turbo.
我正在尝试使用立交桥涡轮从 OSM 检索其边界。 Using the query wizard, I have build the previous query:
使用查询向导,我已经构建了以前的查询:
/*
This has been generated by the overpass-turbo wizard.
The original search was:
“addr:country_code='ES' and admin_level=7”
*/
[out:json][timeout:25];
// gather results
(
// query part for: “"addr:country_code"=ES and admin_level=7”
node["addr:country_code"="ES"]["admin_level"="7"]({{bbox}});
way["addr:country_code"="ES"]["admin_level"="7"]({{bbox}});
relation["addr:country_code"="ES"]["admin_level"="7"]({{bbox}});
);
// print results
out body;
>;
out skel qt;
This would render perfect results if it were not for 2 counties which have not been tag with addr:country_code
and hence are not returned.如果不是 2 个县没有用
addr:country_code
标记,因此没有返回,这将呈现完美的结果。 Example. 例子。
I have observed, though, that all countries are tagged with idescat:comarca
+ int so I would like to use this tag (any value) in my query.但是,我观察到所有国家/地区都使用
idescat:comarca
+ int 进行标记,因此我想在查询中使用此标记(任何值)。 I tried looking for idescat:comarca='.'
我试着寻找
idescat:comarca='.'
but I did not yield any results.但我没有产生任何结果。 What am I doing wrong?
我究竟做错了什么?
I found a way by simply typing idescat:comarca=* in the wizard.我通过在向导中简单地输入 idescat:comarca=* 找到了一种方法。 My initial approach idescat:comarca~“.*“ (regex) was for some reason not valid but the first works like charm!
我最初的方法 idescat:comarca~“.*” (regex) 由于某种原因无效,但第一个方法就像魅力一样!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.