Aggregated values differ in wrappedCountryInfos

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
KZsolt
Posts: 51
Joined: Fri Oct 03, 2014 1:19 pm

Aggregated values differ in wrappedCountryInfos

Post by KZsolt »

Helo Guys!

I face a strange "issue" that I can't answer on my own, please give some advice. :D

Lets say I make an ExtendedRoute calculation with the following points:

Code: Select all

"waypoints": [
      { "latitude": 46.918599, "longitude": 18.111492 },
      { "latitude": 48.430225, "longitude": 12.392042 }
]
In the answer I receive the following result:
(Of course the values might differ with other profiles etc.)

Route.Info.Distance = 636621
Route.Info.Time = 21988


But if sum the Route.WrappedCountryInfos.PartRouteInfo.Distances/Durations (so the separated country relevant values) the values differ (somethimes the difference is more significant):

Sum: 636619

Code: Select all

{ "country": "HU", "distance": 152245 },
{ "country": "SI", "distance": 91568 },
{ "country": "AT", "distance": 332234 },
{ "country": "DE", "distance": 60572 }
Sum: 21987

Code: Select all

{ "country": "HU", "duration": 4629 },
{ "country": "SI", "duration": 3065 },
{ "country": "AT", "duration": 11435 },
{ "country": "DE", "duration": 2858 }
What can cause these differences?

My guess: The distance between the provided point and the segment where the point is linked to does not take part in the country based summary. Is that the correct guess?
User avatar
Bernd Welter
Site Admin
Posts: 2695
Joined: Mon Apr 14, 2014 10:28 am
Contact:

Re: Aggregated values differ in wrappedCountryInfos

Post by Bernd Welter »

Hello Zsolt,

as far as I know your explanation is 100% correct:
The total distance is based on the NC_0, NC_1, ...NC_7 + linking distances.
The national contribution only considers the distances on the NC_0, ...NC_7.
The picture shows the LINKING DISTANCES (39+54 meters).
The picture shows the LINKING DISTANCES (39+54 meters).
and the difference between the "street only distances"
and the difference between the "street only distances"
LinkingDistance.02.PNG (4.2 KiB) Viewed 3728 times
Best regards,
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:
KZsolt
Posts: 51
Joined: Fri Oct 03, 2014 1:19 pm

Re: Aggregated values differ in wrappedCountryInfos

Post by KZsolt »

Hey!

Awesome!

Thanks Bernd!
Post Reply