此处映射:如何有效地检索限速信息? [英] Here Maps: How to retrieve speed limit information in an efficent way?

查看:68
本文介绍了此处映射:如何有效地检索限速信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试检索特定点(纬度,经度)的速度限制信息.我们正在使用此处地图中的 Geocoder API Fleet Telematics Advanced数据集.

We are trying to retrieve speed limit information for a specific point (latitude, longitude). We are using the Geocoder API and Fleet Telematics Advanced Data Sets from Here Maps.

对于某些GPS点,检索到的速度极限值与实际速度极限不匹配.以下是可能的原因:

For some GPS points, the speed limit values retrieved does not match with the real speed limit. Following are the possible causes:

  • GPS精度.GPS点是否可以与不同的道路类型相关.我们如何按路类型进行过滤?
  • 多级道路.
  • 路很近.
  • 我们没有采用正确的方法来检索限速信息.:)

我们按照以下步骤检索限速信息:

We retrieve the speed limit information following these steps:

第1步.从GPS点(纬度,经度)应用反向地理编码请求.

Step 1. Apply reverse geocode request from a GPS point (latitude, longitude).

https://reverse.geocoder.cit.api.here.com/6.2/

我们应用以下参数:

prox=latidude,longitude,radius(value: 10)
mode=retrieveAddresses
maxresults=1
additionaldata=SuppressStreetType,Unnamed
locationattributes=linkInfo

第2步.

我们从JSON响应中检索以下信息:

From the JSON response we retrieve the following information:

ReferenceId (View->Result->Location->MapReference->ReferenceId)
FunctionalClass (View->Result->Location->LinkInfo->FunctionalClass)
SpeedCategory (View->Result->Location->LinkInfo->SpeedCategory)

第3步.应用PDE请求:

https://pde.api.here.com/1/tile.json

我们应用以下参数(值与第一个地理编码器请求的结果相关):

We apply the following parameters (values are related to the results of the first geocoder request):

layer=SPEED_LIMIT_FCX
level (value is 8 + functional class)
tileX
tileY

根据以下示例计算tileX和tileY的值: https://github.com/seaBass3/here-pde-speed-limit/blob/master/Here_PDE_Demo.php

the values for tileX and tileY are calculated following this example: https://github.com/seaBass3/here-pde-speed-limit/blob/master/Here_PDE_Demo.php

第4步.

从JSON响应中,搜索与从地址解析器请求中检索到的ReferenceID匹配的行结果.

From the JSON response we search the row result that matches with the ReferenceID retrieved from the geocoder request.

您能确认该方法是否正确吗?

Can you confirm if the methodology is the right one?

对于某些点,获得的值不同于此演示中显示的结果:

For some points, the values obtained differs from the results displayed in this demo:

https://tcs.ext.here.com/examples/v3/link_speed_locator

有什么建议吗?您可以帮助我们改进此方法吗?还有,有什么方法可以对多个点进行这些请求?

Any suggestion? Can you help us to improve this method? Also, there is any method to do these requests for multiple points?

推荐答案

您需要的只是GeocoderAPI.使用以下参数检索发布的速度限制和自由流动"速度:

All you need is the GeocoderAPI. Use the following parameter to retrieve the posted speed limits and the 'freeflow' speed:

  • addressattributes = additionalData
  • locationattributes = linkInfo

'speedLimit'是发布的两个方向的速度限制.如果将 mode = trackPosition 与方位角一起使用,则响应项的排序方式将使第一项与给定方位角匹配.

'speedLimit' is the posted speed limit for both directions. If you use mode=trackPosition with a bearing, then the response items will be sorted in a way that the first item will match the given bearing.

流量"显示自由流动速度.自由流动速度是指在条件良好(例如没有雨或雪)且交通不拥挤的情况下,车辆在路段上行驶的速度.

'traffic' shows the freeflow speeds. A Free-flow speed is the speed at which traffic would be traveling at on a road segment when conditions are good (e.g., no rain or snow) and when traffic is not congested.

这篇关于此处映射:如何有效地检索限速信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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