globalFractionToSegmentIndexAndLocalFraction Method

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

globalFractionToSegmentIndexAndLocalFraction(globalFraction: 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.

Returns - { fraction: number, index: number }

segment index and local fraction

Defined in

Last Updated: 14 November, 2024