Route violated! But where?

When there is no valid route for your vehicle between two waypoints possible at all, the route is nevertheless calculated and marked as violated. This is typically the case for prohibited areas around waypoints, which have to be entered or exited anyway. Other “obstacles” like weight restrictions on the way are usually bypassed and not part of the calculated route.

Up to now, you can request violation events in such routes containing the position, time and the vehicle property in question. In the new version of the PTV Developer Routing API V1.12.0 we also provide the polylines of the violated route parts by using the new parameter ‘VIOLATION_EVENTS_POLYLINE’.

With this polyline it is easy to display the violated route parts on a map. Illustrated above, the first part of the route is marked in red as this is prohibited for the current vehicle because of the surrounding forest. Of course, there is a new code sample for this feature and you are welcome to play around with it! 

To keep yourself updated about upcoming releases and news you can use the subscribe function on the right hand side. If you got any question do not hesitate to get in contact.