Here Maps: How to retrieve speed limit information in an efficent way?

元气小坏坏 提交于 2021-01-27 10:59:09

问题


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.

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

  • GPS accuracy. If a GPS point can be related to different road types. How we can filter by type road?
  • Multilevel roads.
  • Roads very close to each other.
  • We are not applying the correct method to retrieve the speed limit information. :)

We retrieve the speed limit information following these steps:

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

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

We apply the following parameters:

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

Step 2.

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)

Step 3. Apply a PDE request:

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

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

Step 4.

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?


回答1:


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' 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.



来源:https://stackoverflow.com/questions/56883361/here-maps-how-to-retrieve-speed-limit-information-in-an-efficent-way

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!