Import and Update Distance Matrix

It is possible to import distance matrix with user-defined contents. Then, this distance matrix can be extended using the update operation.

Benefits

  • Customer can import its own data into a matrix and use it in other services.
  • Import and update operations can be combined to import very big matrix.

Prerequisites

Please ensure following prerequisites are fulfilled before you start with the use case:

  • Installed and licensed PTV xDima service

Concepts

Programming Guide

The following example shows how to import a 1x2 distance matrix and retrieve the 2 values.
The content of the distance matrix is imported using the createDistanceMatrix operation with the ImportDistanceMatrixRequest request.
In this example, the distances and travelTimes are sent with the plain format.

The following example shows how to import a 1x2 distance matrix. Then extend the matrix with a 3rd destinations. Finally retrieve the 3 values.
A distance matrix is imported using the same process than the previous example. Then this distance matrix is extended using the UpdateDistanceMatrixRequest operation with the ExtendDistanceMatrixWithContentsRequest request.
In this example, the distances and travelTimes are sent with the plain format.

Related Topics

The following topics might be relevant for this use case.