The road network can have several types of restrictions. Roads for example can
Those restrictions can lead to routes circumventing those restrictions or not being able to be calculated at all. The API supports several parameters to lift or ignore those restrictions so that routes can be calculated. In some of the cases a warning is added to the response that certain restrictions apply to the calculated route.
The use of private streets can be granted or blocked with the parameter avoidPrivate. Accepted values are:
If the driver has keys or permissions to traverse gates these can be allowed to be passed via the parameter traverseGates. Accepted values are:
Almost all countries specify restrictions on allowed truck vehicle parameters like width, height, length, axles, trailers and more. By default, admin-wide truck restrictions are obeyed. The parameter adminTruckRestrictions can be used to ignore them.
By default, the directions of travel are obeyed. This can be modified by using the parameter oneway, specifying a penalty in seconds-per-meter. This parameter is not supported for vehicle types other than bicycles or emergencies. For example,
For bicycles, the recommended value is 0.125, for emergency vehicles, 0.5.
Often drivers need a route, even if there is some of following “problems” getting there:
Of course those restrictions must not be simply ignored, but only violated if there is no other chance to reach the destination, and then having an explicit warning in the response.
The parameter &ignoreWaypointVehicleRestriction allows to configure this to your specific needs.
radius (mandatory): Strictly stay legal and only violate restrictions if necessary while within
Use 2 km to get out of / into pedestrian zones, private yards, 20 km to get out of /into a city, 3000 km to get through country wide truck bans or country wide weight limits.
drivePenaltyFactor (default 0): Traversal cost multiplier (0.0 ... 10.0) created to control how strictly restrictions are avoided. Makes traversing an illegal link becomes more expensive (w.r.t. route path cost optimization).
Use 0 to pass illegal paths at no penalty, 10.0 to use illegal paths only as a last resort (10 times more cost). Usually default 0 is ok and entryPenalty should be set.
type (default allTimed): What kind of access restrictions could be violated (if required to reach the destination). Comma separated list of following values:
allTimed can violate access restrictions that are date/time dependent (nightly truck ban, weekend city truck ban, delivery access only in the morning…), if required to reach the destination.
all can violate all kind of restrictions except construction/incident related road closures. It is important that the application verifies the violation warnings and alerts the driver, to avoid he gets stuck at a tunnel portal or overloads a bridge.
construction can traverse roads closed due to construction/traffic/incident, if required to reach the destination. This is useful, if the driver has a permission or is sure that some local detour will be available.
entryPenalty (default 0): Traversal penalty (in seconds, 0..7200) applied once while ignoring each restriction type, like entering a 'no through traffic' area or entering an 'country wide truck restriction' area.
Use 7200 to make routing avoid such illegal path unless it takes a 2 hours detour to get there completely legal, per entering an illegal section.
Within 2 km around the waypoints return a route even if non-safety critical access restrictions must be violated, 1 hour penalty when using such illegal path.
Ensures reaching destinations in a Pedestrian Zone.
Within 500 km around waypoints return a route even if access restrictions must be violated, 30 minute penalty + almost half driving speed when using such illegal path.
Reach a destination next to construction closed road.
Similar to the global parameter &ignoreWaypointVehicleRestriction which applies to all waypoints, this ensures that waypoint1 can be reached/left in any case.
We'll still get a route, although a known dead end waypoint is not reachable for trucks.