Skip to content

Add signal?: AbortSignal option to TIFF.create #1430

@kylebarron

Description

@kylebarron

#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:

await this.source.fetch(0, getMaxLength(this.source, 0, this.defaultReadSize)),

and here:

const bytes = await this.source.fetch(
nextOffsetIfd,
getMaxLength(this.source, nextOffsetIfd, this.defaultReadSize),
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions