Avoiding specific roads around a Depot

This forum deals with any kind of routing computation whether it is simple A:B-routing, calculation of isochrones, simple matrix computation or nearest search.

Avoiding specific roads around a Depot

Postby Wilhelm » Mon Jan 07, 2019 2:59 pm

Is there a possibility to define roads that should be avoided for all routings of a customer (own server)? This is the case if all trucks should avoid a road when leaving the depot even if it would be the best route.
The best way would be to define these streets (only a small number) via the profile. The 2nd best way would be to define these streets in the requests. What should be avoided is to adapt the streets via RoadEditor. Via points are no option as the routes can start in both directions.
Posts: 1
Joined: Thu Jun 22, 2017 7:06 am

Re: Avoiding specific roads around a Depot

Postby Bernd Welter » Mon Jan 07, 2019 4:08 pm

Hello Daniel,

besides the RoadEditor there are also other options to block custom segments during a routing. The efforts usually depend on the frequency of updates in your data.

If the number of objects is limited you could provide intersecting lines in ExceptionPaths (JSON shows just one of the lines):

javascript code
"extSegments": "",
"street": "",
"binaryPathDesc": "",
"relMalus": 2600,
"intersectingLine": {
"$type": "LineString",
"lineString": {
"$type": "PlainLineString",
"points": [
"$type": "PlainPoint",
"x": 900000,
"y": 4750000
"$type": "PlainPoint",
"x": 900000,
"y": 5000000

The polygons are then part of a routing call, not of profiles.

Best regards,

the vertical lines are the blocked ones. The route takes a strange detour. Not the shortest one but "not crossing the lines"
Sample request
(3.52 KiB) Downloaded 2 times
Bernd Welter
Manager Technical Consulting & Requirement Engineering
Senior Technical Consultant Developer Components
PTV GROUP - Germany

Bernd at Youtube
User avatar
Bernd Welter
Site Admin
Posts: 1216
Joined: Mon Apr 14, 2014 10:28 am

Return to PTV xRouteServer