Truck waypoint sequence
User story
A dispatcher needs to find the fastest way from the central station in Wiesbaden, Germany, to the central station in Mainz, Germany, passing through the central stations in Frankfurt, Darmstadt, Hanau and the airport in Frankfurt. The vehicle used for this journey is a truck (18t) with a trailer (12t), the vehicle height is 4.00m, width 2.50m and length of 18.35m. The dispatcher is not interested in traffic information and wants to know the shortest route.
Request
curl -H "Authorization: Bearer TOKEN_HERE" "https://wps.hereapi.com/v8/findsequence2?start=WiesbadenCentralStation;50.0715,8.2434&destination1=FranfurtCentralStation;50.1073,8.6647&destination2=DarmstadtCentralStation;49.8728,8.6326&destination3=FrankfurtAirport;50.050639,8.569641&destination4=HanauCentralStation;50.1218,8.9298&end=MainzCentralStation;50.0021,8.259&improveFor=distance&mode=fastest;truck;traffic:disabled;&hasTrailer=true&limitedWeight=18&height=4.00&width=2.50&length=18.35"
curl "https://wps.hereapi.com/v8/findsequence2?start=WiesbadenCentralStation;50.0715,8.2434&destination1=FranfurtCentralStation;50.1073,8.6647&destination2=DarmstadtCentralStation;49.8728,8.6326&destination3=FrankfurtAirport;50.050639,8.569641&destination4=HanauCentralStation;50.1218,8.9298&end=MainzCentralStation;50.0021,8.259&improveFor=distance&mode=fastest;truck;traffic:disabled;&hasTrailer=true&limitedWeight=18&height=4.00&width=2.50&length=18.35&apikey=APIKEY_HERE"
Response
{
"results" : [{
"waypoints" : [{
"id" : "WiesbadenCentralStation",
"lat" : 50.0715,
"lng" : 8.2434,
"sequence" : 0,
"estimatedArrival" : null,
"estimatedDeparture" : null,
"fulfilledConstraints" : []
}, {
"id" : "FrankfurtAirport",
"lat" : 50.050639,
"lng" : 8.569641,
"sequence" : 1,
"estimatedArrival" : null,
"estimatedDeparture" : null,
"fulfilledConstraints" : []
}, {
"id" : "HanauCentralStation",
"lat" : 50.1218,
"lng" : 8.9298,
"sequence" : 2,
"estimatedArrival" : null,
"estimatedDeparture" : null,
"fulfilledConstraints" : []
}, {
"id" : "FranfurtCentralStation",
"lat" : 50.1073,
"lng" : 8.6647,
"sequence" : 3,
"estimatedArrival" : null,
"estimatedDeparture" : null,
"fulfilledConstraints" : []
}, {
"id" : "DarmstadtCentralStation",
"lat" : 49.8728,
"lng" : 8.6326,
"sequence" : 4,
"estimatedArrival" : null,
"estimatedDeparture" : null,
"fulfilledConstraints" : []
}, {
"id" : "MainzCentralStation",
"lat" : 50.0021,
"lng" : 8.259,
"sequence" : 5,
"estimatedArrival" : null,
"estimatedDeparture" : null,
"fulfilledConstraints" : []
}
],
"distance" : "164676",
"time" : "11484",
"interconnections" : [{
"fromWaypoint" : "WiesbadenCentralStation",
"toWaypoint" : "FrankfurtAirport",
"distance" : 26568.0,
"time" : 1752.0
}, {
"fromWaypoint" : "FrankfurtAirport",
"toWaypoint" : "HanauCentralStation",
"distance" : 33702.0,
"time" : 2204.0
}, {
"fromWaypoint" : "HanauCentralStation",
"toWaypoint" : "FranfurtCentralStation",
"distance" : 33327.0,
"time" : 2410.0
}, {
"fromWaypoint" : "FranfurtCentralStation",
"toWaypoint" : "DarmstadtCentralStation",
"distance" : 32631.0,
"time" : 2239.0
}, {
"fromWaypoint" : "DarmstadtCentralStation",
"toWaypoint" : "MainzCentralStation",
"distance" : 38448.0,
"time" : 2879.0
}
],
"description" : "Targeted best distance; without traffic"
}
],
"processingTimeDesc" : "2247ms",
"responseCode" : "200",
"warnings" : null,
"requestId" : null
}