The purpose of the Matrix Routing service is to calculate routing matrices for given origins and destinations. The service supports three general modes, each of which comes with a trade-off.
The values of the
profile parameters determine which mode is used. The following table describes the capabilities and limitations of each mode.
|Mode || |
profile parameter provided?
|Custom options and time awareness |
(incl. live traffic)
|Unlimited region ||Matrix size limit |
|Matrix size limit |
|Flexible || |
|no ||yes ||yes ||15 x 100 or 100 x 1 ||15 x 100 or 100 x 1 |
|Region ||one of: |
|no ||yes ||no |
origins and destinations must be within a region of max 400 km diameter
|500 x 500 ||10,000 x 10,000 |
|Profile || |
|yes ||no ||yes ||500 x 500 or 1 x 2000 or 2000 x 1 ||10,000 x 10,000 |
Flexible mode allows custom options and/or dynamic traffic when calculating matrices with routes of arbitrary length, but is only available for matrices with a maximum size of 15x100 or 100x1.
The trade-off of
Region mode is that it enables custom options and/or dynamic traffic only for matrices with origins and destinations that lie in a specific region of at most 400 km diameter. The service requires the region to be defined in the request. In particular, this means that this mode does not support routes of arbitrary length.
The trade-off of
Profile mode is that only predefined sets of options are supported and that the calculation uses free-flow speeds based on historical traffic.
The API requires the user to explicitly choose one of the above modes.
Flexible mode, provide the region definition
world and no more than 15 origins and 100 destinations, or no more than 100 origins and 1 destination.
Region mode, provide any region definition except
Profile mode, provide the region definition
world and select one of the predefined profiles.
For tutorials on how to use each mode, see these sections: