In addition to modifying single entries in a distance matrix, it is also possible to import complete distance matrices from external sources to use them in PTV products. Similarly, in addition to requesting single distances and driving periods, it is also possible to export complete distance matrices that can be used by other systems without the need to access PTV xDima Server.
An external distance matrix consists of two files. One file contains the locations and the other file the distance table. There are two folders for the data exchange provided:
Import files: <PTV xDima folder>/data/dima/import
Export files: <PTV xDima folder>/data/dima/export
The possible data format of these files binary or text (ASCII) is described below.
The file format of the binary location file is defined as follows:
The x and y coordinates of each location are stored in a 4-byte signed integer value.
The locations consisting of x and y coordinates are stored linearly.
The file format of the binary distance table file is defined as follows:
The distance and driving period between two locations is stored in a 4-byte signed integer value.
The distance table entries consisting of distance and driving period are stored linearly.
For example, a distance table that consists of the distances and driving periods between three locations L1, L2 and L3 is stored as follows:
d11/p11, d12/p12, d13/p13, d21/p21, d22/p22, d23/p23, d31/p31, d32/p32, d33/p33
whereby d12 means the distance between L1 and L2 and p12 the corresponding driving period.
The following possible error values are stored in the distance part of a distance table entry:
The route between the locations is not calculated yet.
The route between the locations could not been found.
The file format of the text location file is defined as follows:
The x and y coordinates of each location are stored in a separate row separated by a semicolon (;).
The file format of the text distance table file is defined as follows:
The distances and driving periods between the start location and each destination location are stored in separate rows separated by a semicolon (;).
For example, a distance table that consists of the distances and driving periods between three locations L1, L2 and L3 is stored as follows:
d11;p11; d12;p12; d13;p13
d21;p21; d22;p22; d23;p23
d31;p31; d32;p32; d33;p33
whereby d12 means the distance between L1 and L2 and p12 the corresponding driving period.
The following possible error values are stored in the distance part of a distance table entry:
-1: The route between the locations is not calculated yet.
-2: The route between the locations could not been found.
Copyright © 2025 PTV Logistics GmbH All rights reserved. | Imprint