Skip to content

Commit

Permalink
Merge pull request #278 from ahocevar/geotiffimage-types
Browse files Browse the repository at this point in the history
Make GeoTIFFImage available and fix its type imports
  • Loading branch information
constantinius authored Jan 28, 2022
2 parents 38e838f + 5bf0ced commit 3340514
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/geotiff.js
Original file line number Diff line number Diff line change
Expand Up @@ -730,3 +730,4 @@ export function writeArrayBuffer(values, metadata) {
}

export { Pool };
export { GeoTIFFImage };
4 changes: 3 additions & 1 deletion src/geotiffimage.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import { resample, resampleInterleaved } from './resample.js';
* can be passed.
*/

/** @typedef {import("./geotiff.js").TypedArray} TypedArray */

function sum(array, start, end) {
let s = 0;
for (let i = start; i < end; ++i) {
Expand Down Expand Up @@ -634,7 +636,7 @@ class GeoTIFFImage {
* @param {boolean} [options.enableAlpha=false] Enable reading alpha channel if present.
* @param {AbortSignal} [options.signal] An AbortSignal that may be signalled if the request is
* to be aborted
* @returns {Promise.<import("./geotiff").TypedArray|import("./geotiff").TypedArray[]>} the RGB array as a Promise
* @returns {Promise<TypedArray|TypedArray[]>} the RGB array as a Promise
*/
async readRGB({ window, interleave = true, pool = null, width, height,
resampleMethod, enableAlpha = false, signal } = {}) {
Expand Down

0 comments on commit 3340514

Please sign in to comment.