truck attributes - swedish road classes BK1, BK2, BK3

This forum deals with any kind of routing computation whether it is simple A:B-routing, calculation of isochrones, simple matrix computation or nearest search.
t.mateit
Posts: 13
Joined: Fri Oct 30, 2015 3:50 pm

Re: truck attributes - swedish road classes BK1, BK2, BK3

Post 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
User avatar
Bernd Welter
Site Admin
Posts: 2574
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: truck attributes - swedish road classes BK1, BK2, BK3

Post 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<br />* BK2 in blue<br />* BK3 in black<br />* BK4 in cyan
* 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
  }
}
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
User avatar
Bernd Welter
Site Admin
Posts: 2574
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: truck attributes - swedish road classes BK1, BK2, BK3

Post 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
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)
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
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
User avatar
Bernd Welter
Site Admin
Posts: 2574
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: truck attributes - swedish road classes BK1, BK2, BK3

Post 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!)
ProviderPreferredRoutesTruckAttributes
2022.2T016'826
2022.2H17'17210'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
Attachments
HERE<br />PTV_TruckATtributes 2022.2H
HERE
PTV_TruckATtributes 2022.2H
HERE<br />PTV_PreferredRoutes 2022.2H
HERE
PTV_PreferredRoutes 2022.2H
TOMTOM <br />PTV_PreferredRoutes 2022.2T
TOMTOM
PTV_PreferredRoutes 2022.2T
TOMTOM <br />PTV_TruckAttributes 2022.2T
TOMTOM
PTV_TruckAttributes 2022.2T
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
Post Reply