Skip to main content

Class: MultiCOGLayer

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

A deck.gl CompositeLayer that draws several Cloud-Optimized GeoTIFFs (COGs) as the bands of one image: an opened MultiCOGSource, or a record of COGs for the layer to open.

Use this layer when the COGs are separate files of one composite image: the same scene with the same spatial extent, such as the per-band files of one Sentinel-2 scene. MultiCOGSource.open rejects files that aren't. To render multiple images as a mosaic, use MosaicLayer.

The finest-resolution source is automatically selected as the primary tileset, which drives the tile grid. Secondary sources are sampled at the closest matching resolution.

See​

Extends​

Properties​

defaultProps​

static defaultProps: DefaultProps<RasterTileLayerProps<MinimalTileData>>

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

Overrides​

RasterTileLayer.defaultProps


layerName​

static layerName: string = "MultiCOGLayer"

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

Overrides​

RasterTileLayer.layerName

Methods​

_getTileData()​

_getTileData(tile, options): Promise<MultiTileResult>

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

Fetch tile data for all configured sources at the given tile index.

Primary-grid sources are fetched directly at (x, y, z). Secondary sources are resolved to covering tiles at the closest matching zoom level, fetched (potentially multiple tiles), stitched if necessary, and returned with the appropriate UV transform.

Parameters​

tile​

TileLoadProps

Tile load props from the TileLayer, containing index and signal.

options​

GetTileDataOptions

Returns​

Promise<MultiTileResult>

Per-band textures, UV transforms, and reprojection functions.


shouldLoadMetadata()​

shouldLoadMetadata(params): boolean

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

Whether updateState should load this layer's metadata again, like deck.gl's shouldUpdateState.

By default, the layer loads when source changes to input it has to open, such as a URL. An opened RasterSource needs no loading, and neither does undefined or null, which draw nothing. Subclasses that load other metadata return true when a prop it depends on has changed.

Parameters​

params​

UpdateParameters<MultiCOGLayer>

Returns​

boolean

Overrides​

RasterTileLayer.shouldLoadMetadata