【问题标题】:OverPass API - SpeedLimit around a co-ordinatesOverPass API - 坐标周围的速度限制
【发布时间】:2016-02-02 05:42:00
【问题描述】:

我们正在开发一个应用程序,该应用程序需要查找特定位置周围的速度...我们计划使用 OverPass API 来首先确定速度,并尝试按照下面提到的文章进行操作。

Overpass api to find the speed limit for a co-ordinate?

around方法的语法如下所示。

http://www.overpass-api.de/api/xapi?*[maxspeed=*][around=2500,8.5580957,76.880541]

但是我们没有得到任何结果...如果语法正确,谁能指导我们?

【问题讨论】:

标签: http coordinates overpass-api


【解决方案1】:

失败原因: around 不是 XAPI 中支持的谓词(请参阅原始手册,https://wiki.openstreetmap.org/wiki/Xapi)。所以你不能在查询中使用它。

解决方案 1: 您可以将 around 替换为受支持的 bbox。例如,下面的查询可以正常工作。

http://www.overpass-api.de/api/xapi?*[bbox=-0.489,51.28,-0.436,51.36][maxspeed=*]

您将收到大约 300kB 的数据

解决方案2:如果你还想要around,请使用Overpass QL/XML:

就我而言,Overpass XML 看起来更具可读性。 XML 也是首选,因为 XSLT 可以将其转换为任何其他常规格式。

【讨论】:

  • 现在推荐Overpass QL,xml是旧格式
猜你喜欢
  • 2015-01-31
  • 1970-01-01
  • 1970-01-01
  • 2017-04-17
  • 1970-01-01
  • 2021-12-06
  • 2012-07-14
  • 2013-10-18
  • 1970-01-01
相关资源
最近更新 更多