Calculated toll distance greater than total distance
Posted: Thu Apr 27, 2023 6:18 am
When calculating a route just inside of Germany (to keep things simple) we need to know the total toll distance for the route.
We do this by look at the "toll.sections" collection and add up the "officialDistance" property for all sections.
Over time we noticed that the sum of the toll.sections can be greater the "distance" property of the response which should be the total distance of the route.
Looking at the toll sections in detail, we noticed sometimes sections appear twice, which obviously screws up the result. But even after filtering out duplicates we still have cases where the sum of the officialDistances are greater than the total distance of the route.
Are we doing something wrong here, is there a different (better) way to get the total toll distance?
Or is this a known problem?
We do this by look at the "toll.sections" collection and add up the "officialDistance" property for all sections.
Over time we noticed that the sum of the toll.sections can be greater the "distance" property of the response which should be the total distance of the route.
Looking at the toll sections in detail, we noticed sometimes sections appear twice, which obviously screws up the result. But even after filtering out duplicates we still have cases where the sum of the officialDistances are greater than the total distance of the route.
Are we doing something wrong here, is there a different (better) way to get the total toll distance?
Or is this a known problem?