[英]Overpass API query for specific store names
I am trying to find Costco (or similar) stores in a given area.我正在尝试在给定区域找到 Costco(或类似)商店。 I have tried a few queries with no luck so far.
到目前为止,我已经尝试了一些没有运气的查询。 Currently I'm using Turbo, but I believe I know how to switch to http and JSON.
目前我正在使用 Turbo,但我相信我知道如何切换到 http 和 JSON。 Any advice na working query is greatly appreciated.
非常感谢任何关于工作查询的建议。
Attempts include:尝试包括:
(a) node [name=Costco] ({{bbox}}); (a) 节点 [name=Costco] ({{bbox}}); out;
出去;
This runs, but no results where I know there should be.这运行,但没有我知道应该有的结果。
(b) node [brand:wikipedia=en:Costco] ({{bbox}}); (b) 节点 [brand:wikipedia=en:Costco] ({{bbox}}); out;
出去;
I found the brand info in results for an OpenStreetmaps search, so I think the data is in the database.我在 OpenStreetmaps 搜索的结果中找到了品牌信息,所以我认为数据在数据库中。
This gives error An error occurred during the execution of the overpass query: This is what overpass API returned:这给出了错误执行天桥查询期间发生错误:这是天桥API返回的内容:
Error: line 10: parse error: ',', '~', '=', ':='.错误:第 10 行:解析错误:',','~','=',':='。 or ']' expected - ':' found.
或 ']' 预期 - ':' 找到。
Error: line 10: parse error: ']' expected - ':' found.错误:第 10 行:解析错误:']' 预期 - ':' 找到。
You need to enclose brand:wikipedia
and en:Costco
in quotes.您需要用引号括起
brand:wikipedia
和en:Costco
。 This should work:这应该有效:
node ["brand:wikipedia"="en:Costco"] ({{bbox}}); out;
Try the following query:尝试以下查询:
[out:json][timeout:25];
// gather results
(
// query part for: “shop=* and name=Costco”
nwr["shop"]["name"="Costco"]({{bbox}});
// query part for: “shop=* and brand=Costco”
nwr["shop"]["brand"="Costco"]({{bbox}});
// query part for: “shop=* and operator=Costco”
nwr["shop"]["operator"="Costco"]({{bbox}});
);
// print results
out body;
>;
out skel qt;
This searches for shops with the name, brand or operator "Costco".这会搜索名称、品牌或运营商“Costco”的商店。
You can see an example at overpass-turbo: https://overpass-turbo.eu/s/16OL您可以在 overpass-turbo 看到一个示例: https://overpass-turbo.eu/s/16OL
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.