I am trying to execute a rather simple request using Here FleetApi Demo, this is the request I am trying to do:
https://fleet.api.here.com/2/calculateroute.json?waypoint0=19.3411164,-99.2533428&waypoint1=19.415757,-99.177453&waypoint2=19.344366,-99.251718&mode=fastest;car;traffic:disabled&departure=2021-09-21T11:05:44&alternatives=0&weightPerAxle=0.87t&limitedWeight=1.739t&height=1.67m&width=1.8m&length=4.41m
But this error is returned:
Couldn't reach way point 1 (start links -703403377 703403377 dest links -895284559 895284559 ), closest link to destination reached: 1291258613 at 19.34133/-99.25233, issues: gate
This request has a similar situation on waypoint 2 but this returns the following issue:
Couldn't reach way point 2 (start links 895284559 dest links -832770028 832770028 ), closest link to destination reached: -1077091646 at 19.34552/-99.25272, issues: one way
In both situations, it is possible to travel these routes but Here is unable to calculate it. The only way to do so is by adding a radius to search for the waypoint but that returns wrong routing:
In this example, waypoint blue is the desired waypoint but waypoint green is returned which is not acceptable solution.
Is there a workaround to these issues or am I doing something wrong?
We use Google Maps Directions API to retrieve lat,lon of waypoints.
When you throw the request into demo tool https://tcs.ext.here.com/examples/v3/fleet_telematics_api (expert mode). It will show the error and a red flag at the nearest reached point. Then you see that this is a industrial area or leisure park or similar. The fleet telematics APIs applies various vehicle restrictions and gate restrictions while calculating the route.
If you want to ignore those restrictions you have to set &ignoreWaypointVehicleRestriction=100000 and &traverseGates=true in the request query. Then ,it will ignore the VehicleRestriction and allows the router to traverse all gates.
Sample Request.
https://fleet.api.here.com/2/calculateroute.json?waypoint0=19.3411164,-99.2533428&waypoint1=19.415757,-99.177453&waypoint2=19.344366,-99.251718&mode=fastest;car;traffic:disabled&departure=2021-09-21T11:05:44&alternatives=0&weightPerAxle=0.87t&limitedWeight=1.739t&height=1.67m&width=1.8m&length=4.41m&&ignoreWaypointVehicleRestriction=800000&traverseGates=true
For more details regarding &ignoreWaypointVehicleRestriction=100000 and &traverseGates=true flags ,please refer below API document.
https://developer.here.com/documentation/fleet-telematics/api-reference.html#tag%2FRouting-Extensions-&-Route-Matching%252Fpaths%252F~1v8~1calculateroute.json%252Fget
Related
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,
I'm using a following request to calculate a driving route. What is the correct syntax for specifying the transit radius? For some reason the transit radius isn't honoured for the intermediate waypoint (waypoint1) while working correctly for the final waypoint.
https://route.api.here.com/routing/7.2/calculateroute.json?app_id={appId&app_code={appCode}&waypoint0=geo!50.035035,19.925015;1500&waypoint1=geo!50.06684315082262,19.923276861182046;1500&waypoint2=geo!50.07842990411413,20.032238457351923;1500&mode=fastest;car;traffic:enabled&arrival=2020-05-29T17:27:42.000Z&routeAttributes=shape
I've done an experiment comparison with and without requesting a transfer radius. It seems to be honoured for start and endpoints only.
I sent the same request using the routing v7 and authenticated with the APIKEY and I am not getting a loop, but the route leaves the highway, to access the park gate and then comes back onto the highway. I am not able to recreate the loop that you are getting.
Call used
https://route.ls.hereapi.com/routing/7.2/calculateroute.json?xnlp=CL_JSMv3.1.16.1&apikey=&waypoint0=50.035035%2C19.925015%3B1500&waypoint1=50.06684315082262%2C19.923276861182046&waypoint2=50.07842990411413%2C20.032238457351923%3B1500&mode=fastest%3Bcar%3Btraffic%3Aenabled&arrival=2020-05-29T17%3A27%3A42.000Z&routeAttributes=shape&representation=display
I am regularly getting the error 'Cannot match 52.19888/11.32296 onto a road link with 100.0m search radius'. In these cases, the location is often a warehouse that is indeed more than 100 meters from the nearest public road.
Here is an example query: http://fleet.api.here.com/2/calculateroute.json?mode=fastest;truck;traffic:disabled&driver_cost=20¤cy=EUR&rollups=total,country,tollsys,country;tollsys&commercial=1&shippedHazardousGoods=0&waypoint0=52.51,13.42&waypoint1=52.2787499,11.4330726&tollVehicleType=3&vehicle_cost=0.5&fuelType=Diesel&emissionType=6&length=1500cm&height=270cm&heightAbove1stAxle=120cm&vehicleWeight=7000kg&vehicleNumberAxles=2&trailerType=2&trailersCount=1&trailerNumberAxles=4&trailerHeight=270cm
Is there a way to increase the search radius for the way points in the Fleet Telematics API? I know that it is possible in the Route API, but can't find a way to do it for Fleet.
Or is there another way to get around this error message and get a valid route? For these calculations, I do not need the exact turn-by-turn directions: a route that is similar to the actual route a truck would drive would be enough.
Add the routeMatch parameter with value 1 so that your waypoints will be treated as a GPS trace and the algorithm will return the most probable route along the trace.
When using Fleet Telematics API I have been getting the error message quite often -- about 10% of the routes I want to calculate: "Couldn't reach way point 1 (start links 781909352 -781909352 dest links 881144574 -881144574 881144579 -881144579 ), link 881144574's through traffic restriction might apply, link 881144579's through traffic restriction might apply"
Sample query: http://fleet.api.here.com/2/calculateroute.json?mode=fastest;truck;traffic:disabled&driver_cost=20¤cy=EUR&rollups=total,country,tollsys,country;tollsys&commercial=1&shippedHazardousGoods=0&waypoint0=52.51,13.42&waypoint1=45.747353, 11.733903&tollVehicleType=3&vehicle_cost=0.5&fuelType=Diesel&emissionType=6&length=1500cm&height=270cm&heightAbove1stAxle=120cm&vehicleWeight=7000kg&vehicleNumberAxles=2&trailerType=2&trailersCount=1&trailerNumberAxles=4&trailerHeight=270cm
What are these numbers after the word "links"? Do they give more information about what the restriction might be? And if so, how do I access that information?
When I manually adjust the waypoint latitude and longitude a bit to move it to a nearby bigger road, a route is able to be found. But for me this needs to be automated to work. If I could increase the radius around the waypoint that would be considered a "success" to find a route, that would solve my problem.
The numbers after the word "links' are link IDs with the - indicating an opposite direction of travel. The error means the algorithm cannot get a valid route that goes through those two waypoints without violating the restrictions that you have provided (as parameters). You can add a routeMatch parameter with value 1 so the algorithm will treat you waypoints as GPS trace and find the most probable trace along the route.
I would like to use the HERE navigation API so that I arrive at the destination in a certain heading (in degrees from north, for example). This may require a detour to arrive at the destination in the correct direction. Can this be done? How?
EDIT: Also for a regular routing request, I would like to know the heading at the destination.
Please check Fleet Telematics API documentation on how to provide the heading for a waypoint - https://developer.here.com/documentation/fleet-telematics/api-reference.html. The documentation also helps us understand how to retrieve heading information in the response using customattributes parameter.
waypoint0 ... waypointN
required
string
Comma separated waypoint latitude, longitude in WGS-84 degree. A route must consist of at least 2 waypoints (start and destination). The maximum number of waypoints is limited. However, this limit is not a fixed number but is a result of the limit for the overall processing time. Set a transit radius by ;10000 to only influence the route to go via a certain city Set a heading by ;;;140 (degree clockwise from North) to improve map matching To define a loading/delay time at a waypoint, use stopOver[,timeInSeconds]!. Example: &waypoint1=stopOver,300!50.12,8.65. The optional specifications altitude, custom label, !StreetPosition and !LinkPosition are currently supported. The coordinates may be directly followed by ;transitRadius;label;heading. Waypoints can have opening and closing times, can be unsorted or optional. Details are in Key Concepts / Waypoint sorting, optional Pickup and Opening Times