Skip to main content

Function: assembleTiles()

assembleTiles(tiles, opts): RasterArray

Defined in: assemble.ts:49

Assemble multiple fetched tiles into a single RasterArray.

Handles both pixel-interleaved and band-separate layouts, preserving the original typed array type (e.g. Float32Array, Uint16Array). Masks are assembled alongside data when present.

The output array's transform, crs, and nodata are taken from the top-left tile (the tile at (minCol, minRow)).

Parameters​

tiles​

Tile[]

Fetched tiles to assemble. Must form a contiguous rectangular grid and all share the same layout, band count, and typed array type. Each tile must exactly fill its place in the grid: tileWidth x tileHeight, or smaller in the last column or row when the output size isn't a multiple of the tile size. These are the edge tiles that GeoTIFF.fetchTiles returns with boundless: false.

opts​

AssembleTilesOptions

Describes the output grid dimensions and tile positions.

Returns​

RasterArray

A single RasterArray containing the assembled data.

See​

AssembleTilesOptions