Use Cases > PTV xRoute > How to Use Feature Layer Theme PTV_GeneralTruckRestrictions

How to Use Feature Layer PTV_GeneralTruckRestrictions

The Feature Layer PTV_GeneralTruclRestrcitions provides data about implicit time dependent truck restrictions like weekends, holidays and public days which are influencing truck routes.

Related Topics

The following topics might be relevant for this use case.

Terminology

Feature Layer

The Feature Layer (FL) defines the additional data mechanism. The data is partitioned into several themes that characterize different use cases. For example PTV_GeneralTruckRestrictions is such additional data.

Benefits

PTV xRoute Server

Prerequisites

Check, if the following prerequisites are fulfilled before you start with the use case.

Concept

Feature layers are designed to provide various additional data to the user. The content depends on the feature layer theme and can be configured via XML profile. In the PTV xRoute server, feature layer data can be requested as generic FeatureDescription element for each route segment.

Content of the Feature Layer PTV_GeneralTruckRestrictions

The Feature Layer PTV_GeneralTruckRestrictions includes following countries and truck specific restrictions.

Germany

Austria

Switzerland

Liechtenstein

France

 

Furthermore the Feature Layer PTV_GeneralTruckRestrictions supports several public holidays with constant and varying date. The tables below list the public holidays of the supported countries.

Installation Guide

Programming Guide

Feature Matrix for Feature Layer: PTV_TruckWaitingTimes

Find out which service method of the PTV xRoute Server supports the PTV_GeneralTruckRestrictions Feature Layer theme.

Service Method PTV_GeneralTruckRestrictions
calculateRouteInfo x
calculateRoute x
calculateExtendedRoute x
calculateTour -
calculateAdvancedTour -
calculateMatrixInfo x
calculateReachableObjects -
searchForReachableObjects -
calculateIsochrones -

 

Use a PTV xRoute request with at least two stations and a start time with a general truck restriction (e.g. truck ban on Sundays) and enable the use of the Feature Layer theme PTV_TruckWaitingTimes by setting the following XML profile snippet in the CallerContext of this request.


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Profile xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation=\"http:///xroute/schema/XRouteProfile.xsd\">
  <Common language='en' majorVersion='1' minorVersion='0'/>
  <Routing majorVersion='2' minorVersion='0'>
    <Course>
      <AdditionalDataRules enabled='true'/>
    </Course>
  </Routing>
  <FeatureLayer majorVersion='1' minorVersion='0'>
    <GlobalSettings enableTimeDependency='true'/>
    <Themes>
      <Theme id='PTV_GeneralTruckRestrictions' enabled='true'>
        <FeatureDescription includeLanguageCode='true'>
          <Property id='message' included='true'/>
        </FeatureDescription>
      </Theme>
    </Themes>
  </FeatureLayer>
</Profile>
		

 

Below you can find a JSON sample request which can be directly copied and put into the raw request runner of an xRoute Server to be tested.

By setting "dynamicInfo" : "true" in the request you will receive the actual waiting time for the route in the response (timeLoss).

Furthermore you receive detailed information about the blocking on each segment in the featureDescriptions in your response.