With the toll related parts of the xRoute API it is possible to retrieve toll costs for a specific routeA route corresponds to a path of a vehicle through the underlying transport network. The main attributes of a route are the distance and the time that the vehicle travels along the path. and vehicleThe term vehicle describes what is being routed or planned for. Vehicles are used in route calculation, distance matrix calculation and effectively also in tour planning. In route calculation, vehicle properties like overall size, weight and speed are in focus. In tour planning, it is vehicle properties like capacity and availability. Commonly a vehicle is motorized, like a truck - including its trailer or a car. However also a bike or even a pedestrian are included in this definition.. The structure of the response is designed for flexibility and the possibility to tailor the toll report to your needs. Also with xDima the toll costs can optionally be calculated, stored and accessed for each relation of a matrix.
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.
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 toll report in the route response consists of three main parts:
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.
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.
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 waypointsA waypoint is a geographic location used to specify start, destination and possible stopovers for a route. are put on a toll road.
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 profileA 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:
featureLayerProfile/parameters[@key='isCommercial']/@value
: Toll operators may assign different prices to vehicles by their legal status. Accepted values are NONE, FALSE and TRUE.featureLayerProfile/parameters[@key='numberOfTires']/@value
: Toll operators may assign different prices to vehicles if they have twin wheels. We use the combination of number of axles and number of tires to infer this information. If you set more than twice the number of axles, it is considered a twin wheel vehicle.featureLayerProfile/parameters[@key='numberOfTractorAxles']/@value
: The number of axles for the whole vehicle do not always suffice to represent the vehicle definitions by the toll operators.featureLayerProfile/parameters[@key='numberOfTrailerAxles']/@value
: The number of axles for the whole vehicle do not always suffice to represent the vehicle definitions by the toll operators.featureLayerProfile/parameters[@key='totalPermittedNumberOfPassengers']/@value
: Used to distinguish buses from other vehicles.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.
As of xServer release 2.9 xRoute supports two different data formats regarding toll:
Showcase | Calculate Toll Costs |
Showcase | Calculate Toll Costs with xDima and xRoute |
Showcase | Consider Route Events |
Integration sample | Displaying toll roads |
Integration Sample | Calculating Toll for a Route |
Integration Sample | How to Retrieve the Available Metainformation in the Map |
Technical Concept | Time Consideration |
Technical Concept | Distance Matrices |
Technical Concept | High Performance Routing |