The response of a Matrix Routing request is composed of arrays and other information.
Response arrays
Depending on the results parameter, the response contains one or several one-dimensional arrays.
For each combination, origins (i) and destinations (j) the expected result can be find using the formula:
result = i * N + j
with N, the number of destinations.
{
"distances": [
0,
569819,
571137,
0
],
"travelTimes": [
0,
27720,
27599,
0
]
}
Direct distance
If a relation cannot be calculated using the road network, the relation is estimated using the direct distance ; i.e. the distance as the crow flies.
If all relations can be calculated, the percentageOfDirectDistanceRelations is equal to zero.
{
"percentageOfDirectDistanceRelations": 0
}