0

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. 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. 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 ";" Error: line 5: parse error: An empty query is not allowed

4

1 回答 1

2

由于要查询某个区域的节点,所以需要使用如下语法进行立交turbo:

[out:json][timeout:25];

{{geocodeArea:Vienna}}->.searchArea;
node["highway"](area.searchArea);
out body;
于 2016-05-17T11:12:51.743 回答