-
Notifications
You must be signed in to change notification settings - Fork 8
Description
#1397 / #1400 added support for signal: AbortSignal as an option when fetching individual tiles, but I'd also appreciate support for signal?: AbortSignal in TIFF.create.
In particular, I have a demo here: https://developmentseed.org/deck.gl-raster/examples/naip-mosaic/ that is a mosaic of many underlying COGs (rendered together via STAC). As you pan, new COGs come into the viewport and are added as new "tiles".
It would be a nice optimization to also be able to cancel header requests. I think this would be as simple as passing the signal into fetches here:
cogeotiff/packages/core/src/tiff.ts
Line 99 in 2cb33fb
| await this.source.fetch(0, getMaxLength(this.source, 0, this.defaultReadSize)), |
and here:
cogeotiff/packages/core/src/tiff.ts
Lines 144 to 147 in 2cb33fb
| const bytes = await this.source.fetch( | |
| nextOffsetIfd, | |
| getMaxLength(this.source, nextOffsetIfd, this.defaultReadSize), | |
| ); |