xRoute2: how to determine (inofficial) tollDistance/Country?
Posted: Mon Oct 05, 2020 1:39 pm
Cheerio,
these days a partner asked me how to determine the toll distance per country in xRoute2.
What he encountered was that the Toll and it's list of TollSections does not always contain an "officialDistance". Therefore it would be necessary to aggregate some other output element's distance values:
Best regards,
Bernd
these days a partner asked me how to determine the toll distance per country in xRoute2.
What he encountered was that the Toll and it's list of TollSections does not always contain an "officialDistance". Therefore it would be necessary to aggregate some other output element's distance values:
- Request both the CountryEvents and TollEvents
- Iterate over the events and "memorize" the current country
- Collect corresponding ENTER and EXIT TollEvents based on the AccessTypes
- Determine the length of these "inofficial" toll sections by subtracting ExitEvent.distanceFromStart-EnterEvent.distanceFromStart
- Aggregate them on the level you want...
- per country as a whole
- per country each time you enter it
- in total
Best regards,
Bernd