可以通过指定“out Tags;”来仅获取没有几何图形的标签。 然而,它:
你能推荐我什么?我在 Overpass 中尝试过类似的查询,但到目前为止没有结果。
例如:
[out:json]
[date:"2013-12-31T23:59:59Z"]
[maxsize:1073741824]
[timeout:600]
[bbox:{{bbox}}];
(
way["highway"~"(motorway|trunk|primary|secondary)"]
["name"]
["speed"]
["geometry"];
);
(._;>;);
out body;
类似的东西也不起作用:
[out:json]
[date:"2013-12-31T23:59:59Z"]
[bbox:{{bbox}}];
(
nw["highway"~"(motorway|trunk|primary|secondary)"]
["name"]
["speed"]
["geometry"];
);
(._;>;);
out tags;
可以使用
csv
选项返回特定密钥:
[out:csv (name, maxspeed; true; " | ")]
[timeout:10]
[bbox:{{bbox}}];
way["highway"~"(motorway|trunk|primary|secondary)"];
out;
如果还要输出道路坐标,则需要稍微误用csv输出:
[out:csv (print; false)]
[timeout:10]
[bbox:{{bbox}}];
way["highway"~"(motorway|trunk|primary|secondary)"];
foreach -> .setWay {
.setWay; > -> .setNodes;
make x print = u(t["name"] + " | " + t["maxspeed"]) + " | " + setNodes.set(" " + lat() + ", " + lon()); out;
};
如果输出采用 json 格式,则必须在
make
字符串内相应添加此文本(lat、lon、...)。