Page 2 of 2
Re: truck attributes - swedish road classes BK1, BK2, BK3
Posted: Wed Apr 21, 2021 7:22 am
by t.mateit
Hi Bernd,
this is OK for now.
2 more question came up from the customer:
1. Is it possible to show the different "preferred route types" (for SWE BK1 - 3) in different colors on the map?
2. In case the feature is not activated - as we use it today - the routing basically ignores these categories completely, correct? Weight restrictions are basically ignored for SWE.
BR
Thomas
Re: truck attributes - swedish road classes BK1, BK2, BK3
Posted: Tue Sep 14, 2021 7:52 am
by Bernd Welter
Sorry for the late answer.
It is indeed possible to represent with different colors the different BK types. See for instance the attached request.

- * BK1 in green
* BK2 in blue
* BK3 in black
* BK4 in cyan
Code: Select all
{
"$type": "MapRequest",
"storedProfile": "silkysand",
"requestProfile": {
"featureLayerProfile": {
"themes": [
{
"id": "PTV_PreferredRoutes",
"enabled": true
}
]
},
"renderingProfile": {
"countryStyles": [
{
"countryCodes": "*",
"featureLayerThemes": [
{
"id": "PTV_PreferredRoutes",
"styles": [
{
"displayClass": "NetworkType",
"ranges": [
{
"from": "34",
"to": "34"
}
],
"geometries": [
{
"displayRange": "1-23",
"renderLevel": {
"renderOffset": "+11"
},
"stroke": {
"color": "#00FF00",
"opacity": "100",
"width": "200%"
}
}
]
},
{
"displayClass": "NetworkType",
"ranges": [
{
"from": "35",
"to": "35"
}
],
"geometries": [
{
"displayRange": "1-23",
"renderLevel": {
"renderOffset": "+11"
},
"stroke": {
"color": "#0000FF",
"opacity": "100",
"width": "200%"
}
}
]
},
{
"displayClass": "NetworkType",
"ranges": [
{
"from": "36",
"to": "36"
}
],
"geometries": [
{
"displayRange": "1-23",
"renderLevel": {
"renderOffset": "+11"
},
"stroke": {
"color": "#000000",
"opacity": "100",
"width": "200%"
}
}
]
},
{
"displayClass": "NetworkType",
"ranges": [
{
"from": "37",
"to": "37"
}
],
"geometries": [
{
"displayRange": "1-23",
"renderLevel": {
"renderOffset": "+11"
},
"stroke": {
"color": "#00FFFF",
"opacity": "100",
"width": "200%"
}
}
]
}
]
}
]
}
]
}
},
"coordinateFormat": "EPSG:4326",
"mapSection": {
"$type": "MapSectionByTileKey",
"zoomLevel": 10,
"x": 558,
"y": 315
},
"imageOptions": {
"format": "PNG",
"height": 2000,
"width": 2000
},
"resultFields": {
"image": true
}
}
Re: truck attributes - swedish road classes BK1, BK2, BK3
Posted: Wed Jan 05, 2022 10:16 am
by Bernd Welter
Here's some more valuable info and
a fancy video:
The swedish network classes are described as follows in the
documentation of the prefered routes feature layer:

- Screenshot from the docu
Unfortunately the rendering profiles do not expect these labels such as BK_1 but specific integers and of course the next question is: where to find the matching between such a label and the integer?
Technically spoken the definition of these values is given in the so-called property connector files within the map. Here's an example from my local installation:

- Excerpt from my local propertyConnectorV014.xml (in the map folder)

I can't guarantee that the integer values are stable - they might change from map version to map version!
Best regards,
Bernd
Re: truck attributes - swedish road classes BK1, BK2, BK3
Posted: Wed Jul 20, 2022 2:14 pm
by Bernd Welter
Here's a short update... the attached screenshots show the coverage of PTV_TruckAttributes and PTV_PreferredRoutes in the 2022.2 maps of TOMTOM and HERE in the region of Gothenburg/Sweden.
Here are the numbers for the visualized areas (not for the map as a whole!)
Provider | PreferredRoutes | TruckAttributes |
---|
2022.2T | 0 | 16'826 |
2022.2H | 17'172 | 10'005 |
So TOMTOM provides the "preferred" data in the "truck attributes":
While you are able to specify the PTV_PreferredRoutes (plus the road classes such as Swedish BK_1, ...) with a proper malus in the HERE map you need to choose a different path in the TOMTOM world: make sure that you request PTV_TruckAttributes together with proper vehicle settings.
Bernd