wasm-spatial-core
    Preparing search index...

    Function normalizeCoords

    • Normalize coordinates to [0,1] range.

      Arguments

      • coords — Flat Float64Array [lng0, lat0, lng1, lat1, …]
      • target_bounds — Optional Float64Array [minLng, minLat, maxLng, maxLat]. If not provided, bounds are computed automatically from the data.

      Returns

      New Float64Array with coordinates mapped to [0,1].

      Parameters

      • coords: Float64Array
      • target_bounds: Float64Array

      Returns Float64Array