立交api找到坐标的速度限制? [英] Overpass api to find the speed limit for a co-ordinate?

查看:293
本文介绍了立交api找到坐标的速度限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到一辆车的坐标,我需要找出该车所在的道路的车速限制。我知道你可以找到像这样的特定边界框的最高速度。



www.overpass-api.de/api/xapi? [maxspeed = ] [bbox = 5.6283473,50.5348043,5.6285261,50.534884]



但是,如果这个有界的方框区域只有一个速度限制。所以说假设有一个区域在有界框内有两个速度限制?我的第二个问题是我应该如何制作有界的框,因为我只是得到一个合作伙伴从属于一次?

解决方案

请勿一次询问多个问题。



你的第一个问题我不清楚。查询将返回给定边界框中的所有速度限制,而不仅仅是第一个。关于第二个问题:您应该使用围绕查询而不是边界框。使用围绕,您可以检索给定坐标周围特定半径内的所有元素。示例查询:

 < query type =way> 
< has-kv k =highwayv =/>
< has-kv k =maxspeedv =/>
< / query>
< print />

另请参阅语言指南以及立交桥turbo 来测试您的查询。

I receive coordinate of a vehicle and I need to find out the speed limit of that road at which this vehicle is at?. I know you can find maxspeed for a certain bounded box like this

www.overpass-api.de/api/xapi?[maxspeed=][bbox=5.6283473,50.5348043,5.6285261,50.534884]

but that is if this bounded box area has ONLY one speed limit. So say suppose there was an area which had two speed limit within the bounded box?

My second concern is how should i make the bounded box since I am just getting one co-ordinate at a time?

解决方案

Please don't ask more than a single question at once.

Your first question is not clear to me. The query will return all speed limits in the given bounding box, not just the first one.

Regarding your second question: You should use the around query instead of a bounding box. With around you can retrieve all elements within a certain radius around a given coordinate. Example query:

<query type="way">
  <around lat="5.6283473" lon="50.5348043" radius="25"/>
  <has-kv k="highway" v=""/>
  <has-kv k="maxspeed" v=""/>
</query>
<print/>

Also see the language guide as well as overpass turbo for testing your queries.

这篇关于立交api找到坐标的速度限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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