Network-restricted truck
Note
This feature is currently in beta.
The networkRestrictedTruck transport mode enables route calculation for trucks that are permitted to use specific road networks only.
These networks are typically country- or state-level designations allowing certain heavy vehicle configurations on approved roads, such as High Productivity Motor Vehicles (HPMV) in New Zealand or B-Double and Performance-Based Standards (PBS) networks in Australia.
To calculate a route for a network-restricted truck, set transportMode=networkRestrictedTruck and specify the permitted road networks using the networkRestrictedTruck[permittedNetworks] parameter. Route calculation will use the specified networks to the extent possible.
Only the fast routing mode is supported.
Permitted networks parameter
The permittedNetworks parameter is required when using the networkRestrictedTruck transport mode. It specifies which road networks the truck is allowed to use.
The value is a pipe-separated (|) list of entries. Each entry uses colon-separated fields:
{country}:{state}[,state]...:{network}[,network]...
Where:
{country}— ISO 3166-1 alpha-3 country code (e.g.NZL,AUS){state}— ISO 3166-2 state/territory code (e.g.NSW,QLD). Omitted for countries with only countrywide networks.{network}— one or more network codes from the supported list below
Supported networks
New Zealand (NZL) networks are defined countrywide as opposed to Australian (AUS) networks, which are defined per state/territory.
Note
For a full list of supported networks, see the API reference.
Network-restricted-truck vs truck route
Routes in Network-restricted-truck mode will differ from regular truck routes as they will prioritize the permitted networks and avoid roads that are not part of those networks. Consider the following similar route requests in either mode.
Request a route for a truck permitted on the HPMV network in New Zealand (pictured in blue):
curl -gX GET 'https://router.hereapi.com/v8/routes?'\
'origin=-36.122043,174.330261&'\
'destination=-36.845039,174.778915&'\
'transportMode=networkRestrictedTruck&'\
'networkRestrictedTruck[permittedNetworks]=NZL:hpmv&'\
'return=polyline,summary&'\
'spans=permittedNetworks&'\
'vehicle[grossWeight]=50000&'\
'vehicle[currentWeight]=50000&'\
'vehicle[height]=420&'\
'vehicle[width]=250&'\
'vehicle[length]=2000&'\
'vehicle[axleCount]=8&'\
'vehicle[trailerAxleCount]=4&'\
'vehicle[trailerCount]=1&'\
'apiKey=YOUR_API_KEY'Request a route for a regular truck (not restricted to the HPMV network) between the same locations in New Zealand (pictured in purple):
curl -gX GET 'https://router.hereapi.com/v8/routes?'\
'origin=-36.122043,174.330261&'\
'destination=-36.845039,174.778915&'\
'transportMode=truck&'\
'return=polyline,summary&'\
'vehicle[grossWeight]=50000&'\
'vehicle[currentWeight]=50000&'\
'vehicle[height]=420&'\
'vehicle[width]=250&'\
'vehicle[length]=2000&'\
'vehicle[axleCount]=8&'\
'vehicle[trailerAxleCount]=4&'\
'vehicle[trailerCount]=1&'\
'apiKey=YOUR_API_KEY'Note below how the returned routes are different.
This is due to the fact the bridge shown below is not part of the HPMV network and therefore avoided in the network-restricted-truck route, while the regular truck route includes it.
Permitted networks span
When calculating a route in networkRestrictedTruck mode, not every segment of the route may be covered by the requested permitted networks. The truck may need to travel on regular roads to connect different permitted network segments.
Add the spans=permittedNetworks query parameter to your request to get a response with span-level details for each segment of the route. Spans where the road is not part of any of the requested networks will be marked with "offPermittedNetworks": true.
This parameter was included in the example above. You can see it illustrated below that spans are returned in the result at the beginning and end of the route and depicted in a darker shade of blue.
Examples
New Zealand HPMV route
Calculate a route for a truck permitted on the HPMV network in New Zealand:
curl -gX GET 'https://router.hereapi.com/v8/routes?'\
'origin=-36.848461,174.763336&'\
'destination=-41.286460,174.776236&'\
'transportMode=networkRestrictedTruck&'\
'networkRestrictedTruck[permittedNetworks]=NZL:hpmv&'\
'vehicle[grossWeight]=50000&'\
'vehicle[currentWeight]=50000&'\
'vehicle[height]=430&'\
'vehicle[width]=255&'\
'vehicle[length]=2300&'\
'vehicle[axleCount]=9&'\
'vehicle[trailerAxleCount]=6&'\
'vehicle[trailerCount]=2&'\
'return=polyline,summary&'\
'apiKey=YOUR_API_KEY'Australian B-Double route in NSW
Calculate a route for a B-Double 23m truck at General Mass Limits in New South Wales:
curl -gX GET 'https://router.hereapi.com/v8/routes?'\
'origin=-33.868820,151.209296&'\
'destination=-32.926668,151.776001&'\
'transportMode=networkRestrictedTruck&'\
'networkRestrictedTruck[permittedNetworks]=AUS:NSW:bDouble23Gml&'\
'vehicle[grossWeight]=58000&'\
'vehicle[currentWeight]=58000&'\
'vehicle[height]=430&'\
'vehicle[width]=250&'\
'vehicle[length]=2300&'\
'vehicle[axleCount]=9&'\
'vehicle[trailerAxleCount]=6&'\
'vehicle[trailerCount]=2&'\
'return=polyline,summary&'\
'apiKey=YOUR_API_KEY'Australian B-Double route across NSW and SA
Note that the same network might exist in multiple states. For example, the B-Double 26m truck at General Mass Limits network exists in both New South Wales and South Australia with the same network code bDouble26Gml. To request a route for a truck permitted on this network in both states, you need to specify both networks in the permittedNetworks parameter, e.g. as in the request below for a truck permitted on the B-Double 26m GML network in both NSW and SA, plus PBS Level 2A/2B in either state:
curl -gX GET 'https://router.hereapi.com/v8/routes?'\
'origin=-33.868820,151.209296&'\
'destination=-34.928499,138.600746&'\
'transportMode=networkRestrictedTruck&'\
'networkRestrictedTruck[permittedNetworks]=AUS:NSW:bDouble26Gml,pbs2A|AUS:SA:bDouble26Gml,pbs2B&'\
'vehicle[grossWeight]=63000&'\
'vehicle[currentWeight]=63000&'\
'vehicle[height]=430&'\
'vehicle[width]=250&'\
'vehicle[length]=2500&'\
'vehicle[axleCount]=9&'\
'vehicle[trailerAxleCount]=6&'\
'vehicle[trailerCount]=2&'\
'return=summary&'\
'apiKey=YOUR_API_KEY'Here bDouble26Gml must appear in both entries because each state has a different set of companion networks. You can't combine them into a single entry like AUS:NSW,SA:bDouble26Gml,pbs2A,pbs2B — that would incorrectly imply pbs2A is requested in SA and pbs2B in NSW. If the networks were identical across both states, you could use a single entry with multiple states: AUS:NSW,SA:bDouble26Gml.
Multiple state networks
Request a route that uses B-Triple GML road networks across NSW, Victoria and Queensland, plus additionally PBS3A in Queensland:
curl -gX GET 'https://router.hereapi.com/v8/routes?'\
'origin=-33.861403,151.210909&'\
'destination=-27.469771,153.025124&'\
'transportMode=networkRestrictedTruck&'\
'networkRestrictedTruck[permittedNetworks]=AUS:NSW,VIC:bTripleGml|AUS:QLD:bTripleGml,pbs3A&'\
'vehicle[grossWeight]=83000&'\
'vehicle[currentWeight]=83000&'\
'vehicle[height]=430&'\
'vehicle[width]=250&'\
'vehicle[length]=3500&'\
'vehicle[axleCount]=12&'\
'vehicle[trailerAxleCount]=9&'\
'vehicle[trailerCount]=3&'\
'return=polyline,summary&'\
'apiKey=YOUR_API_KEY'Multiple networks within a state
Request a route for a truck permitted on PBS Level 2A and 2B road networks in Victoria, Australia:
curl -gX GET 'https://router.hereapi.com/v8/routes?'\
'origin=-38.351769,141.611148&'\
'destination=-36.554707,146.730313&'\
'return=polyline,summary&'\
'transportMode=networkRestrictedTruck&'\
'networkRestrictedTruck[permittedNetworks]=AUS:VIC:pbs2A,pbs2B&'\
'spans=permittedNetworks&'\
'vehicle[grossWeight]=60000&'\
'vehicle[currentWeight]=60000&'\
'vehicle[height]=420&'\
'vehicle[width]=250&'\
'vehicle[length]=2600&'\
'vehicle[axleCount]=11&'\
'vehicle[trailerAxleCount]=7&'\
'vehicle[trailerCount]=2&'\
'apiKey=YOUR_API_KEY'Note that it is still recommended to provide details such as vehicle dimensions, weights, trailer/axle count, etc. when using the networkRestrictedTruck transport mode, so that they can be taken into consideration for applicable regulations, speed limits and tolls when calculating a route. Routing does not assume any vehicle parameters based on the networkRestrictedTruck[permittedNetworks] provided.
Updated 7 hours ago