简体   繁体   English

天桥Turbo中的位置查询

[英]Location query in Overpass turbo

I have just learned about the overpass turbo service and its ability for querying data. 我刚刚了解了立交涡轮增压服务及其查询数据的能力。 I have tried the following query and it works fine: 我已经尝试了以下查询,并且工作正常:

[out:json][timeout:25];
(
node["highway"]({{bbox}});
);
out body;

But when I replace the bbox with a name of city which according to the wiki page of overpass it should be like below, the code gives an error. 但是,当我用城市名称替换bbox时,根据立交桥的Wiki页面,它应如下所示,代码给出了错误。 Would be glad to know what is the problem with the second code? 很高兴知道第二个代码有什么问题吗?

[out:json][timeout:25];
(
node["highway"]({{geocodeId: Vienna}});
);
out body;

error message: 错误信息:

An error occured during the execution of the overpass query! 执行立交查询时发生错误! This is what overpass API returned: Error: line 3: parse error: Unknown query clause Error: line 3: parse error: ')' expected - 'node' found. 这是返回的API的错误:错误:第3行:分析错误:未知查询子句错误:第3行:分析错误:预期为“)”-找到“节点”。 Error: line 4: parse error: Unknown type ")" Error: line 4: parse error: An empty query is not allowed Error: line 4: parse error: Unknown type ";" 错误:第4行:解析错误:未知类型“)”错误:第4行:解析错误:不允许空查询错误:第4行:解析错误:未知类型“;” Error: line 5: parse error: An empty query is not allowed 错误:第5行:解析错误:不允许空查询

As you want to query nodes in a certain area, you need to use the following syntax for overpass turbo: 当您要查询某个区域中的节点时,您需要使用以下语法进行天桥turbo:

[out:json][timeout:25];

{{geocodeArea:Vienna}}->.searchArea;
node["highway"](area.searchArea);
out body;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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