Skip to main content

Class: MultiCOGLayer

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

A deck.gl CompositeLayer that opens multiple Cloud-Optimized GeoTIFFs (COGs) in parallel, builds a RasterTilesetDescriptor for each, and groups them into a single MultiRasterTilesetDescriptor.

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​

  • MultiCOGLayerProps for accepted props.
  • createMultiRasterTilesetDescriptor for the grouping logic.
  • geoTiffToDescriptor for the per-source tileset descriptor.

Extends​

Properties​

state​

state: object

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

abortController?​

optional abortController?: AbortController

Aborts the in-flight header reads when the layer is removed, freeing their limiter slots for fresh work.

loadingMetadata?​

optional loadingMetadata?: boolean

True while _parseAllSources is in flight.

multiDescriptor​

multiDescriptor: MultiRasterTilesetDescriptor | null

sources​

sources: Map<string, SourceState> | null

Overrides​

RasterTileLayer.state


defaultProps​

static defaultProps: DefaultProps<RasterTileLayerProps<MinimalTileData>>

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

Overrides​

RasterTileLayer.defaultProps


layerName​

static layerName: string = "MultiCOGLayer"

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

Overrides​

RasterTileLayer.layerName

Methods​

_getTileData()​

_getTileData(tile, options): Promise<MultiTileResult>

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

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.


_parseAllSources()​

_parseAllSources(): Promise<void>

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

Open all configured COG sources in parallel, compute shared projection functions, and build the MultiRasterTilesetDescriptor.

All sources are assumed to share the same CRS; the projection of the first source is used for the shared coordinate converters.

Returns​

Promise<void>

Resolves when all sources have been opened and state has been set.


finalizeState()​

finalizeState(context): void

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

Called once when layer is no longer matched and state will be discarded. Layers can destroy WebGL resources here.

Parameters​

context​

LayerContext

Returns​

void

Overrides​

RasterTileLayer.finalizeState


initializeState()​

initializeState(): void

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

Returns​

void

Overrides​

RasterTileLayer.initializeState


updateState()​

updateState(__namedParameters): void

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

Default implementation, all attributes will be invalidated and updated when data changes

Parameters​

__namedParameters​

UpdateParameters<MultiCOGLayer>

Returns​

void

Overrides​

RasterTileLayer.updateState