Custom Feature Layers can be created in order to consider user-defined information during the routeA route corresponds to a path of a vehicle through the underlying transport network. The main attributes of a route are the distance and the time that the vehicle travels along the path. calculation.
Custom Feature Layers can be used to :
The operation to create a custom Feature Layer is createFeatureLayer provided by the PTV xData service.
The resulting custom Feature Layer can be used by several PTV services: by xRoute to calculate routes, by xDima to create a distance matrix, and by xData to create a high-performance routing network or a content snapshot. It can be also rendered on the map by xMap when the layer is persisted on the server.
Retrieving the relevant segmentIds is a step that must be performed beforehand. The operation is explained in the Accessing Data technical concept. For each created Feature, it is possible to define as key/value, via a Feature Description, the attributes values. The list of attributes that can be used are documented in the PTV_RoadAttributes theme.
Several kinds of uses can be made and some integration samples are given.
For all kinds of uses Time Domains could be used for scheduled the custom Feature Layers. It is quite possible to build a restriction for only certain hours of the day, or a few days of the week. For example, a route hosting a market is opened for shopkeeper according to a legally regulated schedule that the custom Feature Layers allow to consider.
createFeatureLayer offers the possibility to either return a binary object which can be used in subsequent requests, or to directly persist the custom Feature Layer on server-side.
As binary object, the encoded representation of the Feature Layer is provided in FeatureLayerResponse. Thus, it is only available for the caller and nothing is saved on the server-side. The caller can provide this object in a xRoute request with RouteOptions.binaryFeatureLayer , or in a xDima request with DistanceMatrixOptions.binaryFeatureLayer.
The size of a Feature Layer binary object cannot exceed 20 000 road segments with the default configuration in order to limit the size of the responses. However, it is possible to increase this value changing the server configuration file (see Server Configuration page) or to create several Feature Layers. Furthermore, it is not possible to use a binary object with CreateHighPerformanceRoutingNetworkRequest, and createContentSnapshot . Also, it is not possible to render a custom Feature Layer as binary object with the PTV xMap service.
As persistent layer, the Feature Layer is stored as a file under the path "data/flr". When creating a custom Feature Layer, users must specify a unique scenario name. The scenario name is the layer identifier; this is the name that will appear in the User Data Monitor when listing custom Feature Layers or that must be filled in the featureLayerProfile to be used by the other operations, if the PTV_RoadAttributes theme is activated. Note that the complete path folder of a scenario is “data/flr/tenant/scope”. Please note that it is possible to create Feature Layers with a same scenario name but located in different scopes.
More details about the tenant and scope can be found on this technical concept.
Contrary to binary object, there is no size limitation, and all operations can use the persistent layer.
customFeatureLayer
.customFeatureLayerManagement
. Only one Feature Layer theme is currently supported for custom layer generation: PTV_RoadAttributes.
The property opening open the one-ways or the blockings from PTV_TruckAttributes or PTV_Restriction_Zones. But it does not "open" PTV_General_Truck_Restrictions or PTV_TrafficIncidents.
Contrary to the opening property, one-ways are kept unchanged.
The speeds interval accepted is between 0 and 254 km/h. An absolute speed of 0 km/h should block the road. It is not checked if the absolute speed applied to a segment exceeds any legal limits.
If a feature contains an absolute speed property, then this feature must not contain other properties.
Can be a custom string. Does not influence the routing but can be combined with any other property to provide a description for other users.
The relative speed corresponds to a percentage to apply on the speed value. The value accepted is between 0 and 254.
A percentage below 100 decreases the speed. A percentage above increases the speed. And 100% changes nothing.
A percentage of 0 blocks the road. It is not checked if the absolute speed applied to a segment exceeds any legal limits.
It is only possible to apply custom Feature Layer on road segments. Therefore, it is not possible to use custom feature Layers on combined transportThe combined transport is a form of transport where the vehicle in question does not drive itself but is transported by a boat or by rail (piggyback). segments (boat, rail).
Custom Feature Layers can be used in combination with Feature Layers provided by PTV. All the layers can be combined, individually selected, and prioritized using the same conflict-handling mechanisms. For a client-side request one can define which layers have to be taken in consideration, and how. By default, custom Feature Layers are settings with a higher priority, but note that General Truck Restrictions or Traffic Incidents will not be affected by the opening operation.
Features can have a direction (see segmentDirections).
Custom Feature Layers are map-dependent. Indeed, the segmentIds are not the same according to the map versions. When changing maps, users will have to update their custom Feature Layers. To do this, it is advisable to store the segmentIds described in Accessing Data technical concept in order to have the possibility to regenerate custom Feature Layers.
It is possible to create time-dependent restrictions. For that, GDF Time Domains are used.
There are no automated clean-up mechanisms, therefore please remove obsolete layers.
Technical Concept | Feature Layer basics |
Technical Concept | Feature Layer attributes |
Technical Concept | Accessing Data |
Technical Concept | PTV_RoadAttributes |
Technical Concept | Multitenancy |
Technical Concept | Time Domains |
Integration Sample | Creating and considering custom Feature Layers |
Showcase | Displaying custom blockings |