Class: MultiCOGLayer
Defined in: packages/deck.gl-geotiff/src/multi-cog-layer.ts:384
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.
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. 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
- MultiCOGLayerProps for accepted props.
- createMultiRasterTilesetDescriptor for the grouping logic.
- geoTiffToDescriptor for the per-source tileset descriptor.
Extends
RasterTileLayer<MultiTileResult,MultiCOGLayerProps>
Properties
state
state:
object
Defined in: packages/deck.gl-geotiff/src/multi-cog-layer.ts:395
abortController?
optionalabortController?:AbortController
Aborts the in-flight header reads when sources changes or the layer
is removed, freeing their limiter slots for fresh work.
loadingMetadata?
optionalloadingMetadata?:boolean
True while _parseAllSources is in flight.
multiDescriptor
multiDescriptor:
MultiRasterTilesetDescriptor|null
sources
sources:
Map<string,SourceState> |null
Overrides
RasterTileLayer.state
defaultProps
staticdefaultProps:DefaultProps<RasterTileLayerProps<MinimalTileData>>
Defined in: packages/deck.gl-geotiff/src/multi-cog-layer.ts:392
Overrides
RasterTileLayer.defaultProps
layerName
staticlayerName:string="MultiCOGLayer"
Defined in: packages/deck.gl-geotiff/src/multi-cog-layer.ts:388
Overrides
RasterTileLayer.layerName
Methods
_getTileData()
_getTileData(
tile,options):Promise<MultiTileResult>
Defined in: packages/deck.gl-geotiff/src/multi-cog-layer.ts:563
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:455
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:412
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:405
Returns
void
Overrides
RasterTileLayer.initializeState
updateState()
updateState(
__namedParameters):void
Defined in: packages/deck.gl-geotiff/src/multi-cog-layer.ts:417
Default implementation, all attributes will be invalidated and updated when data changes
Parameters
__namedParameters
UpdateParameters<MultiCOGLayer>
Returns
void
Overrides
RasterTileLayer.updateState