Here's the REST API - getlinkinfo returns an invalid speed limit

I used the getlinkinfo command to view speed limits. The values ​​returned by the API are reduced by 3.6 times compared to the set speed limits on the roads in my community. For example, there is a request for the road segment of Highway 101 in Fredericton, NB, Canada, which has a speed limit of 90 km / h:

http://route.st.nlp.nokia.com/routing/6.2/getlinkinfo.xml?app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg&waypoint=45.921339,-66.666753&linkattributes=scs

(short link - http://goo.gl/EWfKDe )

This request returns a speed limit of "25" and the actual posted speed limit is 90. Can you tell me why the <SpeedLimit> values do not contain the actual posted speed limit? Is it because I am using the "DemoAppId"? 

Bernie

+1
rest api here-api
source share
1 answer

The speedLimit element speedLimit always returned in m / s , so you need to use the conversion factor to get typical units of road signs. Multiply by 3.6 for km / h or 2.23 for mph . If speedLimit not present, the national speed limit is applied.

Why did you choose m / s that you can ask? I believe that this was done in order to avoid rounding errors in the calculations, sequentially using the smallest unit of distance (meter) and the smallest unit of time (second) on the platform HERE. I assume that the data underlying getlinkinfo is used in calculating routes.

A working example can be found in the HERE Maps community on GitHub.

+9
source share

All Articles