Skip to main content

Type Alias: MultiCOGLayerProps

MultiCOGLayerProps = Omit<RasterTileLayerProps<MultiTileResult>, "tilesetDescriptor" | "getTileData" | "renderTile"> & Pick<COGLayerProps, "pool"> & object

Defined in: packages/deck.gl-geotiff/src/multi-cog-layer.ts:120

Props for the MultiCOGLayer: those of COGLayerProps, with the files of one scene as source, and band compositing in place of a custom getTileData and renderTile.

Type Declaration​

composite?​

optional composite?: object

Map source bands to RGB(A) output channels.

See​

buildCompositeBandsProps

composite.a?​

optional a?: string

composite.b?​

optional b?: string

composite.g?​

optional g?: string

composite.r​

r: string

debugLevel?​

optional debugLevel?: 1 | 2 | 3

How much the debug labels show, with debug on. They label the primary tile and each band read at another resolution.

  • 1: tile index and resolution only
  • 2: adds UV transform and tile count
  • 3: adds stitched dimensions and meters/pixel

Default​

1

onSourceLoad?​

optional onSourceLoad?: (source) => void

Called with the source the layer opened, when source isn't an opened MultiCOGSource already.

Parameters​

source​

MultiCOGSource

Returns​

void

renderPipeline?​

optional renderPipeline?: RasterModule[]

Post-processing render pipeline modules applied after compositing.

Modules see each band's samples in units that depend on its data type, so give values such as a nodata value or a rescale range in those units:

  • uint8 and uint16 bands are normalized to 0-1: a sample divided by 255 or 65535.

  • Every other type (signed integers, uint32 and floats) keeps its raw value.

    Support for these types is experimental, and the units they arrive in are likely to change.

See​

RasterModule

resampling?​

optional resampling?: "linear" | "nearest"

How band textures are resampled when drawn.

  • "linear" blends the four nearest pixels, for a smooth image.
  • "nearest" uses the single nearest pixel, so pixel edges stay sharp and every value drawn is a value in the data.

Use "nearest" with an exact-match nodata filter such as FilterNoDataVal: linear blending mixes the nodata value into the pixels around it, so those pixels no longer match it and are drawn as a rim around the nodata area.

Changing this prop updates tiles that are already loaded, without fetching them again.

A band whose texture format the device can't filter is always drawn with "nearest", such as a 16-bit band stored as 32-bit floats on a device without float filtering.

Default​

"linear"

source​

source: MultiCOGSource | Record<string, COGInput>

The files of one scene to draw: an opened MultiCOGSource, or a record of COGs for the layer to open with the defaults of MultiCOGSource.open, each a URL string, URL, ArrayBuffer or opened GeoTIFF. An empty record draws nothing.

Each name is a band name for composite. Open the files yourself to change those defaults, such as the EPSG resolver or the request limiter, or to share them between layers.

Keep the same object across renders: a new one starts the layer's tiles over.