Hello.
How can I use the PTV Developer API to determine the toll highway kilometers per country from waypoint to waypoint?
Thanks in advance for your help.
Best regards,
Martin
Highway Kilometers per country from waypoint to waypoint
-
- Posts: 1
- Joined: Mon Sep 02, 2024 11:09 am
- Bernd Welter
- Site Admin
- Posts: 2721
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: Highway Kilometers per country from waypoint to waypoint
Hi Martin,
thanks for that question - The detailed report you'd like to generate is not an "out of the box" response element in Developer Routing API.
I forwarded your question to DEV & Product Management for a comment and also created a feature request.
To anyone who wants such a feature, too: Please describe the benefit for a user if he has access to such a report. I can then add the info to the story.
My statement about the API itself:
The required elements might be spread over toll events,
Bernd
thanks for that question - The detailed report you'd like to generate is not an "out of the box" response element in Developer Routing API.
I forwarded your question to DEV & Product Management for a comment and also created a feature request.
To anyone who wants such a feature, too: Please describe the benefit for a user if he has access to such a report. I can then add the info to the story.
My statement about the API itself:
The required elements might be spread over toll events,
- waypoint events / border events / toll events (structure of legs, bordercrossings...)
- toll sections (distances...)
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...
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...
- Bernd Welter
- Site Admin
- Posts: 2721
- Joined: Mon Apr 14, 2014 10:28 am
- Contact:
Re: Highway Kilometers per country from waypoint to waypoint
Wow - here comes a very detailed response from our experts!
#BestTeamEver Thanks!
#BestTeamEver Thanks!
Afaik someone asked for a distiction betweenPlease provide as much information about the use cases and specific requirements as you can.
- You're correct that there is no toll distance report on route level or leg level. And there is no toll distance report that distinguishes road types or toll types.
- I have a question about the term "highway". What does to the customer mean by that? Is it to distinct general toll roads from special tolls like bridges, tunnels and city toll? Highway may refer to different roads in different countries. So in order to build what the customer needs, a clarification is required.
- A report of toll distances per leg and country is possible to derive solely from the events. As you suggested, by requesting waypoint events, border events toll events, you are perfectly able to aggregate for each leg the toll distance in the countries of these legs. You can simply add and subtract the value of the field distanceFromStart of the different events according to some business logic. With the waypoint and border events you memorize to which country and leg to add the distanceFromStart. If it's an EXIT toll event, you add it and if it's an ENTER toll event you subtract it.
- Note that waypoint events can occur in between a pair of toll events. In such cases, you should add the distanceFromStart of the waypoint event for the current leg and subtract it for the next leg.
- Note that border events will never occur in between a pair of toll events (if so, that would be a bug).
- This does not yet distinguish the different toll road types. For that, you would indeed request the toll sections and add up the reported section distances per toll road type. But the basic logic to iterate over the events to decide to which leg and country the values of the toll sections should be added to, can be reused.
- For an actual distinction between highway and not highway, API extensions are necessary.
- German Autobahns (I guess that was meant by "highways", Martin?)
- German Federal Roads aka Bundesstraße
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...
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...