如何在OpenStreetMap中获得给定位置周围的所有道路? [英] How to get all roads around a given location in OpenStreetMap?

查看:399
本文介绍了如何在OpenStreetMap中获得给定位置周围的所有道路?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无法弄清楚如何在给定位置获得特定半径的所有道路.我当前的查询是

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/>

(天桥Turbo产生的结果)

请参见公路钥匙. .openstreetmap.org"rel =" noreferrer> OpenStreetMap Wiki 来解释不同的值.

See the highway key in the OpenStreetMap wiki for an explanation of the different values.

这篇关于如何在OpenStreetMap中获得给定位置周围的所有道路?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆