Skip to main content

Type Alias: COGLayerProps<DataT>

COGLayerProps<DataT> = Omit<RasterTileLayerProps<DataT>, "tilesetDescriptor" | "getTileData" | "renderTile"> & COGLayerDataProps<DataT> & object

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

Props that can be passed into the COGLayer.

Type Declaration

concurrencyLimiter?

optional concurrencyLimiter?: ConcurrencyLimiter | null

Caps concurrent HTTP requests for this layer's source fetches.

Defaults to a maximum of 6 concurrent requests per origin, which aligns with browser limits of 6 HTTP/1.1 requests per origin. If your sources support HTTP/2 or HTTP/3, you may want to increase this limit or disable it entirely by passing null.

Ignored when geotiff is a pre-opened GeoTIFF instance — wire the limiter via GeoTIFF.fromUrl at construction time instead.

epsgResolver?

optional epsgResolver?: EpsgResolver

A function callback for parsing numeric EPSG codes to projection information (as returned by wkt-parser).

The default implementation:

  • makes a request to epsg.io to resolve EPSG codes found in the GeoTIFF.
  • caches any previous requests
  • parses PROJJSON response with wkt-parser

geotiff

geotiff: GeoTIFF | string | URL | ArrayBuffer

Cloud-optimized GeoTIFF input.

onGeoTIFFLoad?

optional onGeoTIFFLoad?: (geotiff, options) => void

Called when the GeoTIFF metadata has been loaded and parsed.

Parameters

geotiff

GeoTIFF

options
geographicBounds

{ east: number; north: number; south: number; west: number; }

Bounds of the image in geographic coordinates (WGS84) [minLon, minLat, maxLon, maxLat]

geographicBounds.east

number

geographicBounds.north

number

geographicBounds.south

number

geographicBounds.west

number

projection

ProjectionDefinition

Returns

void

pool?

optional pool?: DecoderPool

Worker pool for decoding image chunks.

If none is provided, a default Pool will be created and shared between all COGLayer and GeoTIFFLayer instances.

signal?

optional signal?: AbortSignal

A user-provided AbortSignal to cancel loading.

This can be useful in combination with the MosaicLayer, so that when a mosaic source is out of the viewport, all of its tile requests are automatically aborted.

Type Parameters

DataT

DataT extends MinimalTileData = DefaultDataT