mapGlobalToLocalFraction MethodStatic

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

mapGlobalToLocalFraction(globalFraction: number, numSegment: number): { fraction: number, index: number }

@returns segment index and local fraction

Parameter Type Description
globalFraction number a fraction f in the linestring parameterization, where the i_th segment
(0 <= i < N) is parameterized by i/N <= f <= (i+1)/N. If globalFraction is negative (or greater than 1),
so is the returned local fraction, which corresponds to the first (last) segment.
numSegment number number N of segments in the linestring

Returns - { fraction: number, index: number }

segment index and local fraction

Defined in

Last Updated: 21 November, 2024