问题描述
我对使用立交桥 API 还很陌生,我终于设法生成一个查询,通过使用立交桥涡轮向导来检索区域内的所有节点.
I'm fairly new at using overpass API, I finally managed to generate a query to retrieve all nodes within an area by using overpass-turbo wizard.
在向导中使用 highway=* in "Paulino Navarro"
生成以下查询.
Using highway=* in "Paulino Navarro"
in the wizard generates me the following query.
/*
This has been generated by the overpass-turbo wizard.
The original search was:
"highway=* in "Paulino Navarro""
*/
[out:json][timeout:25];
// fetch area "Paulino Navarro" to search in
{{geocodeArea:Paulino Navarro}}->.searchArea;
// gather results
(
// query part for: "highway=*"
node["highway"](area.searchArea);
way["highway"](area.searchArea);
relation["highway"](area.searchArea);
);
// print results
out body;
>;
out skel qt;
但是,如何使用多边形作为搜索区域? 可能类似于 highway=* in poly([lat,lon],[lat,lon],...,[lat,lon])
或者我如何在查询本身上做到这一点.
However, how could I use a polygon as a search area? maybe something like highway=* in poly([lat,lon],[lat,lon],...,[lat,lon])
or how can I do that on the query itself.
我不太了解overpass wiki 和overpass-turbo 向导中的文档.
I don't quite understand the documentation in overpass wiki nor overpass-turbo wizard.
推荐答案
示例:
[out:xml][timeout:30];
way[highway=primary](poly:"50.7 7.1 50.7 7.2 50.75 7.15");
(._;>;);
out;
这篇关于使用多边形作为搜索区域立交桥 api/立交桥涡轮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!