Toll

Characteristic

Use

A basic toll summary can be retrieved for a route by setting enabled to true in the toll result fields. With the further result fields sections and systems a detailed toll report can be requested.

In xDima, when a distance matrix is created, the toll costs have to be activated as additional contents in the distance matrix options. In order to get the toll costs of a matrix the corresponding result field has to be activated.

Detailed Consideration

With the toll related parts of the xRoute and xDima API it is possible to retrieve toll costs for a specific route or relation of a matrix, depending also on the vehicle parameters and the reference time.

The xRoute toll report

The toll report in the route response consists of three main parts:

At the leg result there is only the toll summary for each route legClosed A route leg is a part of a route between two consecutive waypoints. which can be retrieved through setting the leg result field toll summary to true. The toll sections of a leg can be determined by two indices into the sections array which are returned as soon as the sections toll result field is set to true. Also the toll events are linked to the toll sections array with a section index.

The xDima toll calculation

In xDima, the toll costs calculation can be requested by setting the option persistTollCosts in the distance matrix options to true. To query the toll costs, the toll result field in the distance matrix contents result fields should be used.

Please note that when using a Create and Get distance matrix request, the option persistTollCosts is ignored and instead the toll costs result field should be used. The time consideration scenarios multiple travel times and exact are not supported when requesting toll prices in xDima.

Toll road distances

The main focus of PTV's toll data is to provide accurate prices, however sometimes the distance on toll roads is also of use. With the release of version 2.30 the behaviour of the toll events and the start and end node indexes of a toll section have been improved. Furtheremore, the field calculatedDistance has been added to the toll section next to the official distance:

There are two different recipes to aggregate the toll road distances: You can use the toll sections or the toll events.
When you request the toll sections you can determine the effective toll road distance. It is your decision what you take from the toll section but one suggestion is to use the official distance when returned and the calculated distance otherwise.
Then, to aggregate the toll road distance for: Using the toll events it is simpler to aggregate the toll road distances. However, this approach doesn't incorporate the official distances and it doesn't allow to aggregate by toll system. All route events contain the field distanceFromStart and when a toll road is used, it is marked with a pair of ENTER and EXIT toll events. To determine the effective toll road distance, just subtract the distance from start of the ENTER toll event from distance from start of the EXIT event.
Then, to aggregate the toll road distance for:

Time dependency

The toll calculation also considers time dependent toll prices such as different prices for peak hours. It is also possible to calculate toll prices for dates in the future as far as this data is available and contained in the map. Please refer to the technical concept on time consideration which time consideration modes are supported. Without a time consideration mode provides a reference time it is possible to miss out on toll prices. In such cases use the mode TollOnlyTimeConsideration as its reference time is only used for toll price determination but not for routing.

Avoiding toll roads during route selection

With setting the toll penalty it is possible to avoid toll roads during route selection. Please note that the toll road sections cannot be avoided if waypoints are put on a toll road.

Vehicle parametrization

In the documentation for the vehicle profile there are sets of numbers at each parameter describing for which features and feature layers they might be used. The number (2) is for toll calculation.

Furthermore, some vehicle parameters can be set through the generic mechanism in the feature layer profile. Sometimes new vehicle parameters are introduced first by this generic mechanism and are later added to the vehicle profileClosed A profile is a collection of parameters used to configure the request. Full profiles consist of a number of specialized sub-profiles like the VehicleProfile which describes the properties of a vehicle. with the next API version. Of course it is also possible to adapt these parameters to your needs:

Since the end of the year 2023 two new vehicle parameters are relevant for toll calculation in several European countries (e.g., Austria and Germany) with the implementation of the 2022 version of the Directive 1999/62/EC of the European Parliament and of the Council on the charging of heavy goods vehicles for the use of certain infrastructures.

  1. The CO₂ emission class (available since xServer version 2.30): As specified in Article 7ga of the above mentioned directive, vehicles with high CO₂ emissions shall pay a higher toll compared to vehicles with low CO₂ emissions.

  2. The total technically permitted weight (available since xServer version 2.32): It is a variant of the already existing total permitted weight and in particular refers to the technically permitted weight, which is normally specified by the manufacturer. It is possible to register a vehicle with a legally permitted weight (which we refer to with the existing parameter total permitted weight) smaller than the technically permitted weight. For example, in Germany often vehicles with a technically permitted weight of a bit more than 3.5t are registered with a legally permitted weight of just 3.5t; this procedure is also called "Ablasten" in German. On the one hand, the maximum allowed payload is smaller, on the other hand there are some benefits like the vehicle can be driven with a normal driver's license or it is allowed to use roads that are closed for trucks. Up to 2023 there was another benefit since the smaller legally permitted weight was also relevant for tolls, but with the implementation of the above mentioned EU directive the technically permitted weight becomes relevant instead.

    The European Union Council Directive 1999/37/EC on the registration documents for vehicles specifies three different variants of permissible laden mass (which is called "permitted weight" at the xServer API):

    • (F.1) maximum technically permissible laden mass
    • (F.2) maximum permissible laden mass of the vehicle in service in the Member State of registration (optional)
    • (F.3) maximum permissible laden mass of the whole vehicle in service in the Member State of registration (optional)

    Often these values are the same, and in this case it is sufficient to set one of the parameters total permitted weight or total technically permitted weight to that value (see also the section on weight parameters of the technical concept on vehicle parameters). However, if they are different, you can set F.1 as total technically permitted weight and F.3 or F.2 as total permitted weight. This allows that the correct total technically permitted weight is used for toll calculation and the different total (legally) permitted weight is used for other decisions like whether a road is closed or not. Note that the term "total" indicates that the permitted weight parameters always refer to the whole vehicle including all trailers.

Good to know

Licensing

The license key toll needs to be activated to render toll roads and to calculate toll prices. Avoidance of toll roads is possible with the general xroute license.

Data formats and sources

As of xServer release 2.9 xRoute supports two different data formats regarding toll:

  • For the legacy format the xServer provides basic support. A toll summary can be returned for the complete route as well as the legs. Furthermore, it is possible to avoid toll roads. However, it is not possible to get details like the toll sections, toll systems, and toll events along the route. The format won't be further developed and integrated.
  • With the new format the full detailed toll API is supported, which is stable as of xServer release 2.16. It is in parts still under development.
As switching the production process takes time, upcoming maps may still contain only the legacy format for some or all countries. If there is data in the new format for some country of a continent, by default only the new data format is used for the whole continent. The usage of the legacy format can be enforced by setting the parameter use detailed toll to false.

VAT

The toll prices gathered by PTV are always without VAT.