Route Calculation

To get a route calculation from A to B where A and B can be either a position, a location, a port or a ship, use the following API operation:

POST /ship/route

The request, which payload beyond a source and destination must contain information about the expected draught of a ship, will respond with a request ID. The returned request ID will be used to retrieve the result.

GET /ship/route/<request ID>

The result will contain distance to be traveled to get from A to B in meters and a route  that route defined by a geoJSON LineString

Notice that the operation may take several seconds to complete and thus the POST will return a HTTP code 202 to indicate the operation is in progress, the subsequent GET operation will also return HTTP code 202 until the operation is completed. GET will then return HTTP code 200 along with the result. Further more the result will automatically be deleted after the GET operation has responded with HTTP code 200. Thus it is not required for the client to issue the DELETE request.

Be aware that the position reports in the result may be a minute or more old depending on whether the data is collected from satellite or ground station. This is NOT a real time data stream.

For usage example see Calculate route.

Updated on 30 October, 2018