getSteepSections method
Get list of route sections which are abrupt, that is, they have a significant elevation change.
Parameters
- IN categs The user list of steep categories. Each entry contains the max slope for the steep category as diffX / diffY.
A common steep categories list is {-16.f, -10.f, -7.f, -4.f, -1.f, 1.f, 4.f, 7.f, 10.f, 16.f}
A positive value is for an ascension category, a negative value if a descent category.
Each section has the start distance from route start and the category (index in user defined steep categories).
The end of the section is the distance from start of the next section or route total length (for the last section)
Returns
- The steep sections list
Throws
- An exception if it fails.
Implementation
List<SteepSection> getSteepSections(final List<double> categs) {
final OperationResult resultString = objectMethod(
_pointerId,
'RouteTerrainProfile',
'getSteepSections',
args: categs,
);
final List<dynamic> listJson = resultString['result'];
final List<SteepSection> retList = listJson
.map(
(final dynamic categoryJson) => SteepSection.fromJson(categoryJson),
)
.toList();
return retList;
}