Tolls for every point in one route

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
VeeTennis
Posts: 11
Joined: Tue Mar 14, 2023 7:53 am

Tolls for every point in one route

Post by VeeTennis »

Hi,

Is it possible to get tolls for every point? Let's say we have a trip of 4 points. So we would like to get tolls for polylines:
  • 1 to 2
  • 2 to 3
  • 3 to 4
Currently we get tolls for the whole route --> 1 to 4. See an image attached.
Also, using multiple waypoints in a single request is not a viable option, due to different dangerous goods and tunnel restrictions between different waypoints.
Attachments
tolls for every point.jpg
User avatar
Bernd Welter
Site Admin
Posts: 2574
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Tolls for every point in one route

Post by Bernd Welter »

Hello Vytenis,

hopefully the following parameters help you to apply the solution through xRoute2 API:

1. To change vehicle settings in a single routing call look into com.ptvgroup.xserver.xroute.VehicleParametersAtWaypoint This supports OffRoadWaypoint, OnRoadWaypoint and MultiCoordinateOnRoadWaypoint
2. Then you can use the com.ptvgroup.xserver.xroute.Leg property com.ptvgroup.xserver.xroute.TollSummary to get the costs per leg
tollPerLeg.png
Is that what you are looking for?
Bernd
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