我正在尝试获取我国所有学校的列表,经过几次尝试后,我编写了以下查询,该查询在http://overpass-turbo.eu上没有错误:
/*
This has been generated by the overpass-turbo wizard.
The original search was:
“amenity=school”=“yes”
*/
[out:json][timeout:60];
// gather results
(
// query part for: “amenity=school”
node[amenity=school]({{geocodeBbox:Italia}});
way[amenity=school]({{geocodeBbox:Italia}});
relation[amenity=school]({{geocodeBbox:Italia}});
);
// print results
out body;
>;
out skel qt;
我曾经geocodeBbox
选择意大利的所有学校,因为geocodeId
和geocodeArea
(请参阅文档)给我以下错误:
Error: line 10: parse error: ')' expected - '(' found.
Error: line 11: parse error: ')' expected - '(' found.
Error: line 11: parse error: ';' expected - ')' found.
Error: line 12: parse error: ')' expected - '(' found.
Error: line 12: parse error: ';' expected - ')' found.
Error: line 13: parse error: Unknown type ")"
Error: line 13: parse error: An empty query is not allowed
Error: line 13: parse error: Unknown type ";"
Error: line 15: parse error: An empty query is not allowed
无论如何,问题是查询甚至选择了不在意大利的学校(例如,有一所来自克罗地亚的学校)。
那么,如何准确地从某个国家获得积分呢?