Template Function lanelet::geometry::lengthRatios
Defined in File LineString.h
Function Documentation
-
template<typename LineStringT>
std::vector<double> lanelet::geometry::lengthRatios(const LineStringT &lineString) Calculates the length ratios for the lines in the LineString.
The length ratio of a line is the line’s length divided by the LineString’s length.
The function is templated to work on all LineString types, 2d or 3d. Depending on the type, the result will be computed in 2d or 3d.
- Parameters:
lineString – the linestring to do this for.
- Returns:
A vector of length ratios. Size is lineString.size()-1