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.
Post Reply
Wilhelm
Posts: 7
Joined: Thu Jun 22, 2017 7:06 am

Avoiding specific roads around a Depot

Post by Wilhelm »

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.
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Avoiding specific roads around a Depot

Post by Bernd Welter »

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):

Code: Select all

{
      "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,
Bernd
the vertical lines are the blocked ones. The route takes a strange detour. Not the shortest one but "not crossing the lines"
the vertical lines are the blocked ones. The route takes a strange detour. Not the shortest one but "not crossing the lines"
wilhelm.xml
Sample request
(3.52 KiB) Downloaded 330 times
Bernd Welter
Technical Partner Manager Developer Components
PTV Logistics - Germany

Bernd at... The Forum,LinkedIn, Youtube, StackOverflow
I like the smell of PTV Developer in the morning... :twisted:
Post Reply