segmentIndexAndLocalFractionToGlobalFraction Method

Convert a segment index and local fraction to a global linestring fraction.

segmentIndexAndLocalFractionToGlobalFraction(index: number, localFraction: number): number

@returns global fraction f such that the segment is parameterized by index/N <= f <= (index+1)/N.

Parameter Type Description
index number index of segment being evaluated
localFraction number local fraction relative to the segment, typically in [0,1]. Fraction may be negative (or greater than 1) to represent extension of the first (or last) segment.

Returns - number

global fraction f such that the segment is parameterized by index/N <= f <= (index+1)/N.

Defined in

Last Updated: 17 December, 2024