Page 1 of 1

Aggregated values differ in wrappedCountryInfos

Posted: Tue Dec 12, 2017 12:40 pm
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?

Re: Aggregated values differ in wrappedCountryInfos

Posted: Tue Dec 12, 2017 12:55 pm
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 3144 times
Best regards,
Bernd

Re: Aggregated values differ in wrappedCountryInfos

Posted: Tue Dec 12, 2017 1:06 pm
by KZsolt
Hey!

Awesome!

Thanks Bernd!