Skip to main content

Function: matrixTransform()

matrixTransform(matrix): Affine | null

Defined in: transform.ts:18

Construct a single affine transform that maps pixel coordinates within any tile of the matrix to CRS coordinates.

Returns null when the matrix declares variableMatrixWidths, because coalesced rows have a different X pixel size than the rest and cannot be described by one transform. Use tileTransform in that case.

Pixel (0, 0) is the top-left corner of tile (0, 0). The column pixel index runs across the full matrix: globalPixelCol = col * tileWidth + pixelWithinTile_x globalPixelRow = row * tileHeight + pixelWithinTile_y

Parameters

matrix

TileMatrix

Returns

Affine | null