Displaying Feature Layer PTV_RestrictionZones
This layer provides Restricted transit areas for example truck transit zones. This Feature Layer contains restricted transit areas what means areas, which have special restrictions. These restricted areas may be used by certain vehicle The term vehicle describes what is being routed or planned for. Vehicles are used in route calculation, distance matrix calculation and effectively also in tour planning. In route calculation, vehicle properties like overall size, weight and speed are in focus. In tour planning, it is vehicle properties like capacity and availability. Commonly a vehicle is motorized, like a truck - including its trailer or a car. However also a bike or even a pedestrian are included in this definition. types, but only as start or destination otherwise they must not be passed through.
- Forbid whole areas to vehicles having a total permitted weight above a certain threshold.
- Delivery vehicles are allowed to navigate in areas that are free for delivery, but ONLY at start and destination ("At Waypoints A waypoint is a geographic location used to specify start, destination and possible stopovers for a route.").
- Area restrictions may be given for a certain set of vehicle types, identified through a transportSystem property
As part of the EU regulations on limits for air pollutants,
various regions and cities with high particulate air pollution installed so-called clean air and action plans,
which includes environmental zones or drive-through zones prohibiting the transit of specific types of vehicles for example trucks larger than 7.5 t.
FreeForDelivery zone |
Delivery vehicle |
Zone navigability |
---|---|---|
true |
true |
only in waypoints zones |
true |
false |
no |
false |
true |
no |
false |
false |
no |
This article explains how to visualize RestrictionZones on a map.
Benefits
Using RestrictionZones you can
- avoid violations of legal restriction zones like low-emission zones by taking these into account in the routing A 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. process,
- visualize such restrictions on the map.
Prerequisites
Check if the following prerequisites are fulfilled before you start with the use case:
- Installed and licensed PTV xMap Server
- Installed PTV Map
- Installed and licensed Feature Layer theme PTV_RestrictionZones
Concepts
- Feature Layer
-
Feature Layers provide additional content to enrich PTV maps, such as vehicle-dependent restrictions on roads, or even live traffic information. These data may, for example, help to improve routing results.
Various Feature Layer themes providing different kinds of content are available. Several Feature Layer themes may be used in combination.
Programming Guide
When using the REST REST (Representational State Transfer) represents a World Wide Web paradigm, consisting of constraints to the design of components which results in a better performance and maintainability. API to build a tiled map, the REST operation tile is part of the following URL, by means individual tiles can be requested:
http://hostname:50000/services/rest/XMap/tile/{zoomLevel}/{x}/{y}?storedProfile={profile A profile is a collection of parameters used to configure the request. Full profiles consist of a number of specialized sub-profiles like the VehicleProfile which describes the properties of a vehicle.}
Concrete values in URL template have to be defined for zoomlevel, x and y coordinates, specifying the map section of the corresponding tile.
To display PTV_RestrictionZones on a map with common content, the parameter layers
has to be specified in the URL enabling all base layers
and PTV_RestrictionZones.
http://hostname:50000/services/rest/XMap/tile/{zoomLevel}/{x}/{y}?storedProfile={profile}&layers=labels,transport,background,PTV_RestrictionZones
To obtain a map which contains only PTV_RestrictionZones, the parameter layers
has to be specified in the URL enabling only
PTV_RestrictionZones.
http://hostname:50000/services/rest/XMap/tile/{zoomLevel}/{x}/{y}?storedProfile={profile}&layers=PTV_RestrictionZones
Example
In the example below, which is based on the one from Displaying a Basic Interactive Map, RestrictionZones are displayed on a tiled map using the Leaflet toolkit:
var map = new L.Map('map', { center: [49.61, 6.125], zoom: 13 }); // Add layer with PTV map and Feature Layer RestrictionZones var tileUrl = xServerUrl + '/services/rest/XMap/tile/{z}/{x}/{y}?storedProfile=silkysand&layers=labels,transport,background,PTV_RestrictionZones'; new L.TileLayer(tileUrl, { minZoom: 3, maxZoom: 18, noWrap: true }).addTo(map);Related Topics
The following topics might be relevant for this use case.