Symptom
A truck route is calculated using Custom Feature Layers (CFL) defining a categorized Exceptional Transport (TE) network (e.g. 1TE, 2TE48). Segments of this TE network carry maxWeight restrictions from HERE data (via PTV_TruckAttributes), for example 19T, which conflicts with the authorized TE tonnage (e.g. up to 44T).
To allow the vehicle to travel on TE segments despite these HERE restrictions, the vehicle weight is set to 1T in the request:
json
"weight": {
"totalPermittedWeight": 1000,
"emptyWeight": 1000,
"loadWeight": 0
}
This workaround allows the route to follow the TE network. However, outside the TE network, the vehicle is treated as a light vehicle (1T) and ignores real weight restrictions on non-TE segments — for example passing through segments with a 3.5T limit without any violation reported.
The expected behavior is:
- HERE weight (and height) restrictions ignored on TE network segments
- HERE weight (and height) restrictions applied on all other segments
Cause
The vehicle weight is a global parameter in xRoute. It cannot be conditionally applied depending on whether a segment belongs to a specific CFL network.
Setting totalPermittedWeight to 1T to bypass maxWeight HERE restrictions on TE segments disables all weight-based restrictions on the entire route, including segments outside the TE network.
However, this workaround is not necessary. When a Custom Road Class is declared as preferredRouteTypes in the vehicle profile, PTV_TruckAttributes restrictions — including physical restrictions such as maxWeight and maxHeight — are already ignored on the corresponding segments by the routing engine. Only opening/blocking restrictions remain active.
This behavior is by design and is confirmed by PTV engineering.
Resolution
Step 1 – Assign a customRoadClass to all TE network segments in the CFL (e.g. CUSTOM_ROAD_CLASS_5). This is typically already done in the client's CFL configuration.
Step 2 – Declare this road class as preferredRouteTypes in the xRoute request vehicle profile:
"vehicleProfile": {
"preferredRouteTypes": "CUSTOM_ROAD_CLASS_5",
"weight": {
"totalPermittedWeight": 44000,
"emptyWeight": 14500,
"loadWeight": 25500
}
}
Step 3 – Set the real vehicle weight in the request. The 1T workaround is no longer needed.
Result:
- On CUSTOM_ROAD_CLASS_5 segments (TE network): PTV_TruckAttributes physical restrictions (maxWeight, maxHeight) are ignored by the routing engine.
- Outside the TE network: all HERE restrictions apply normally.
- Custom height CFL (CFL_Hauteur) remains active independently on all segments.
The issue is resolved when the route correctly follows the TE network using the real vehicle weight, without triggering false violations outside the TE network.
Note — unrestrictedRouteTypes is not suitable for this use case
unrestrictedRouteTypes also ignores all PTV_TruckAttributes restrictions on the corresponding segments, but without the ability to filter by property type. Height restrictions from HERE would also be ignored, which is not acceptable if the client uses a custom CFL_Hauteur to manage bridge/tunnel height constraints independently. preferredRouteTypes is the correct mechanism for this use case.
Related articles
PTV xServer 2: RouteNotFoundFault when using truck profiles with PTV_TruckAttributes enabled
PTV xServer 2: PTV_TruckAttributes feature layer: role and requirement for ADR routing
PTV xServer 2: Route divergence after changing vehicle parameters (height, weight)
PTV xServer 2: Height Violations Disappear or Route Changes When Adding a Waypoint