How to set speedProfile when using the HERE Fleet Telematics API? - here-api

I need to use the Fleet Telematics API since I need to calculate tolls (since the routing API doesn't), and I want to adjust the speedProfile to fast.
I see I can do that with the speedProfile parameter for the routing api, but that parameter seems to do nothing for the fleet telematics API.
So, is there no way to set the speed profile for the fleet telematics api? I need to use truck routing, but want normal car speed.
Or, is there another API that will calculate tolls AND let me adjust the speed profile?

Indeed there is no speedProfile parameter for the fleet telematics API. But, it is possible to use speedFcCat parameter to override the default driven speed values.
From the documentation here
speedFcCat: Comma separated list of speeds driven in kilometer per hour per road functional class (1-5 + Virtual Connections VC) and speed category (1-8) (f.e. FC1-SC1,FC1-SC2,...,FC1-SC8;FC2-SC1,FC2-SC2,...;...;VC-SC1,FC-SC2,...VC-SC8). Functional classes are semicolon separated. Can contain empty entries (no change to default f.e. 80,76,,,,,,;,,,54,46,,,;...).

Related

HERE Maps - truck restrictions

I'm using the Here API to calculate routes for trucks with 40t. Using the HERE devtools, i got the same error of my APP. The answer is "The API can't calculate the route because of illegal access". I checked the map (image attached) and in the street where my journey will start, with a difference of some meters, it exists two limitations 12t and 18t. The street is one way... If you see the satellite image exists several trucks... The company is testing the software says the trucks goes their...
Can some help me on this?
https://fleet.api.here.com/2/calculateroute.json?waypoint0=41.325299,2.141551&waypoint1=stopOver,3600!41.3291843,2.0317197&waypoint2=stopOver,3600!40.91260530,-8.42291420&waypoint3=38.855951,-9.104382&mode=fastest;truck;traffic:enabled&departure=2020-08-19T02:57:58&alternatives=0&weightPerAxle=14t&limitedWeight=40t&height=4m&width=2.55m&length=16.5m&trailersCount=
If you want to ignore the restrictions for trucks in the route, add the parameter truckRestrictionPenalty and set the value to soft.
The route violating truck restrictions is indicated in the response with dedicated route and manoeuvre notes. The route with the note of the type violation and the text truckRestriction may be travelled at your own responsibility. While driving on such a route, extra care has to be taken as it may result in a vehicle or road infrastructure damage.
You can read more about the parameter here.
Thanks for your feedback, but we are using the Fleet Telematics Api not the Routing API. Using your info, We researched a litle more and we found the equivalent parameter: ignoreWaypointVehicleRestriction.
We added these params &ignoreWaypointVehicleRestriction=5000;0;all and the API returned the route with the warning.
Thanks,

Get summary by country with Fleet Telematics API

I want to use Fleet Telematics API and get information about traffic time/travel time and distance by country similar to what is described here. As you can see this is supported in Routing API but it does not support "bus" as a TransportMode.
I tried to use "rollups" query param but it only aggregates toll costs by country not distance and time which I'm looking for. Is there a way to achieve this with Fleet Telematics API?
Please check if this accomplished your task.
http://cre.api.here.com/2/calculateroute.json?app_id={}&app_code={}&overlays=OVERLAYMYMAP&mode=fastest;bus;traffic:enabled&waypoint0=geo!50.8857,14.81589&waypoint1=geo!50.8681536,14.8308207
for more information.
https://developer.here.com/documentation/custom-routing-extension/dev_guide/topics/resource-calculateroute.html

How to calculate Over Posted Speed Limit on highway using lat,long in here map

I have latitude and longitude where my car is driving on highway. I want to know whether my car speed is greater than highway speed where I am driving
You can achieve this by using the simple Routing API(used for routing usecases) or Fleet Telematics API(used for complex routing problems like trucks).
Routing API: The below example provides the speed limits in a particular route. You can check this against your car speed limit to verify if you are driving within limits. Read more about the api in Here developer site - https://developer.here.com/documentation/routing/topics/resource-get-route.html
https://route.api.here.com/routing/7.2/calculateroute.json?waypoint0=41.69758,-87.78397&waypoint1=41.70056,-87.77429&mode=fastest;car&storage=readonly&linkAttributes=speedLimit&app_code=yyyyy&app_id=xxxx&representation=linkPaging
Fleet Telematics API: You can get the speedlimit information along a route using this api as well. Here provides numerous examples on how to do this in https://tcs.ext.here.com/examples site. Just login with your Here credentials and search for speed. You can take a look at the source code there. You can also read more about this api in Here website https://developer.here.com/documentation/fleet-telematics/dev_guide/index.html
Hope you find these useful!Happy Coding!

Can I request a truck route with a maximum gradient or elevation change?

I am setting up a routing service specific to certain types of trucks. I have been searching the HERE documentation for a way to specify a maximum gradient for the route, but cannot seem to find such a function. Am I missing something? Is this possible? My users indicate that 5% is a good threshold for certain trucks.
Fleet Telematics API provides you the capability to handle such situation. PDE layer supports slope information in ADAS_ATTRIB_FCn. Below are some methods to achieve the above ask. You can pick any of the suggested ways depending on your usecase. Hope you find it useful.
Set fuel consumption on slope to very high number – calculateroute.json method provides a requestParameter “customConsumptionDetails” in which the slope value could be set very high number that the route calculation tries to avoid such routes. Refer https://cle.api.here.com/swagger-ui.html?app_code=xxxx&app_id=xxxx#!/Routing_%26_Route_Matching/calculateRouteUsingGET
Request for adas attributes and avoid slope links - Set requestParamater “attributes=ADAS_ATTRIB_FCn (SLOPES)” and get adas layer. Determine the links you would want to traverse and trigger same query setting “avoidLinks” requestParameter. Refer https://cle.api.here.com/swagger-ui.html?app_code=xxxx&app_id=xxxx#!/Routing_%26_Route_Matching/calculateRouteUsingGET. Also https://tcs.ext.here.com/pde/layer?region=WEU&release=18144&url_root=pde.api.here.com&layer=ADAS_ATTRIB_FC1 for explanation on ADAS attributes.
Add custom overlay – This method is used widely by our current customers. You can add a custom layer on top of Here Map layers where you can avoid links/roads where your trucks should pass through. Read more on overlays - https://developer.here.com/documentation/custom-routing-extension/topics/resource-overlay.html

Here API Routing - Avoid unpaved roads

can anyone write how to avoid unpaved roads in Here routing (or truck routing) in REST API? I have checked API and I couldn't find answer. Routing API routes cars or trucks via dirty roads, what is unaccepted.
RouteFeatureType:The routing features can be used to define special conditions on the calculated route. The user can weight each feature with non-positive weights.
Possible paramers are: tollroad, motorway, boatFerry, railFerry, tunnel, dirtRoad,
park.
The Feature weights are used to define weighted conditions on special route features like tollroad,
motorways, etc.
-3 strictExclude The routing engine guarantees that the route does not contain strictly
excluded features. If the condition cannot be fulfilled no route is returned.
-2 softExclude The routing engine does not consider links containing the corresponding
feature. If no route can be found because of these limitations the condition is weakened.
-1 avoid The routing engine assigns penalties for links containing the corresponding
feature.
0 normal The routing engine does not alter the ranking of links containing the
corresponding feature.
Of course does the map content play also a huge role here. It is needed for the routing that the attribution e.g. for a dirt road (unpaved road segment) is set correctly.
You can also check details and report issues here: https://mapcreator.here.com

Resources