wasm-spatial-core
    Preparing search index...

    Function gridIndex

    • Assign each point to a spatial grid cell.

      Arguments

      • coords — Flat Float64Array [lng0, lat0, lng1, lat1, …]
      • cell_size_deg — Grid cell size in degrees

      Returns

      Float64Array with one grid ID per point. Points in the same cell get the same ID.

      Parameters

      • coords: Float64Array
      • cell_size_deg: number

      Returns Float64Array