Skip to content
pyautark (soon)

@urban-toolkit/autk-db


@urban-toolkit/autk-db / isRasterTable

Function: isRasterTable()

isRasterTable(table): table is GeotiffTable | UserTable & { type: "raster" }

Defined in: interfaces.ts:215

Narrows a table to raster-backed layers.

Use this guard before reading raster band metadata or raster-specific options.

Parameters

table

Table

Table metadata to inspect.

Returns

table is GeotiffTable | UserTable & { type: "raster" }

true when the table represents raster data.

Throws

Never throws.

Example

ts
const rasterTables = tables.filter(isRasterTable);
console.log(rasterTables[0]?.bands?.map((band) => band.label)); // ['Band 1']

Released under the MIT License.