Compute Route
Compute Route
POST
/api/v1/routing/route
Description
Feature Preview: This endpoint is restricted to pilot customers. Contact Us if you are interested in access.
Compute a route between a set of two or more waypoints.
The API will internally run a path planning algorithm which attempts to find a safe, optimal route based on a number of constraints (Vessel draft, turning restrictions, etc.)
If successful, the endpoint will return a path as an array of latitude & longitude points.
If the routing fails, the endpoint will return an array of error messages.
Authentication
This endpoint accepts a Bearer token in the Authorization header or a token query parameter. See Authentication for details.
Request Body
The request body should be JSON-encoded.
- waypoints (Required): An array of two or more input waypoints as
[latitude, longitude]pairs. The algorithm will be constrained to route through each of these waypoints sequentially.
Example Request
POST https://api.vectorcharts.com/api/v1/routing/route
Authorization: Bearer <token>
Request Body:
{
waypoints: [
[42.338749, -70.986042],
[42.303464, -70.948277]
]
}
Example Response
Status Code: 200 OK
Response Body:
{
"success": true,
"messages": [],
"route": [
[42.340272, -70.985527],
[42.333293, -70.973511],
[42.335323, -70.960980],
[42.335323, -70.947762],
...
]
}