How to apply PTV_TruckAttributes (xRoute1)
Posted: Tue Jun 23, 2020 7:27 am
Hi there,
recently I've been asked whether requesting a regular profile such as smt-truck-40t-slow is sufficient to ensure the consideration of the vehicles dimensions, weights, freight categories and so on in the call to xRoute 1. In fact this is not enough: you also have to tell the routing engine to match these properties with additional PTV_TruckAttributes content. To achieve this you need to add the following keys to the profile:
1. AdditionalDataRules=true : this will tell the engine that additional data content will be considered.
2. FeatureLayer themes : this will tell the enging WHICH content has to be considered
You can add those XML fragments either in the server side XML profile or override them through the well known snippet mechanism (in the CallerContex).
This also works fine with other FeatureLayers such as PTV_TruckSpeedPatterns, PTV_SpeedPatterns or PTV_RestrictionZones.
Best regards,
Bernd
PS: in xServer2 you can define these properties through the regular API (request profile)
recently I've been asked whether requesting a regular profile such as smt-truck-40t-slow is sufficient to ensure the consideration of the vehicles dimensions, weights, freight categories and so on in the call to xRoute 1. In fact this is not enough: you also have to tell the routing engine to match these properties with additional PTV_TruckAttributes content. To achieve this you need to add the following keys to the profile:
1. AdditionalDataRules=true : this will tell the engine that additional data content will be considered.
2. FeatureLayer themes : this will tell the enging WHICH content has to be considered
Code: Select all
<Profile>
<FeatureLayer majorVersion="1" minorVersion="0">
<GlobalSettings enableTimeDependency="true" enableVehicleDependency="true" />
<Themes>
<Theme id="PTV_TruckAttributes" enabled="true" priorityLevel="0" />
</Themes>
</FeatureLayer>
<Routing majorVersion="2" minorVersion="0">
<Course>
<AdditionalDataRules enabled="true" />
</Course>
</Routing>
</Profile>
This also works fine with other FeatureLayers such as PTV_TruckSpeedPatterns, PTV_SpeedPatterns or PTV_RestrictionZones.
Best regards,
Bernd
PS: in xServer2 you can define these properties through the regular API (request profile)