问题描述
无法弄清楚如何在给定位置获得特定半径的所有道路.我当前的查询是
Cant figure out how to get all roads for the specific radius at the given location. My current query is
<query type="way">
<around lat="55.693309807744484" lon="21.151986122131348" radius="50"/>
</query>
<union>
<item/>
<recurse type="down"/>
</union>
<print/>
我试图添加类似这样的内容<highway>primary,secondary,tertiary,residential</highway>
,但没有成功
I tried to add something like this <highway>primary,secondary,tertiary,residential</highway>
but it didn't worked
推荐答案
请在立交桥涡轮上查看您的查询一个>.它确实返回给定点附近的所有路线.因此,您的解析器似乎有问题.
See your query on overpass turbo. It does return all ways around the given point. So you seem to have a problem in your parser.
如果要过滤特定的高速公路类型,则必须按照说明指定标签在 Overpass API语言指南中:
If you want to filter for specific highway types then you have to specify a tag as described in the Overpass API Language Guide:
<query type="way">
<around lat="55.693309807744484" lon="21.151986122131348" radius="50"/>
<has-kv k="highway" regv="trunk|secondary"/>
</query>
<union>
<item/>
<recurse type="down"/>
</union>
<print/>
请参见公路钥匙. .openstreetmap.org"rel =" noreferrer> OpenStreetMap Wiki 来解释不同的值.
See the highway key in the OpenStreetMap wiki for an explanation of the different values.
这篇关于如何在OpenStreetMap中获得给定位置周围的所有道路?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!