diff --git a/src/geotiff.js b/src/geotiff.js index 842da8a2..072dff23 100644 --- a/src/geotiff.js +++ b/src/geotiff.js @@ -681,7 +681,7 @@ export { MultiGeoTIFF }; * @returns {Promise} The resulting GeoTIFF file. */ export async function fromUrl(url, options = {}, signal) { - return GeoTIFF.fromSource(makeRemoteSource(url, options), signal); + return GeoTIFF.fromSource(makeRemoteSource(url, options), options, signal); } /** @@ -693,7 +693,7 @@ export async function fromUrl(url, options = {}, signal) { * @returns {Promise} The resulting GeoTIFF file. */ export async function fromArrayBuffer(arrayBuffer, signal) { - return GeoTIFF.fromSource(makeBufferSource(arrayBuffer), signal); + return GeoTIFF.fromSource(makeBufferSource(arrayBuffer), {} , signal); } /** @@ -709,7 +709,7 @@ export async function fromArrayBuffer(arrayBuffer, signal) { * @returns {Promise} The resulting GeoTIFF file. */ export async function fromFile(path, signal) { - return GeoTIFF.fromSource(makeFileSource(path), signal); + return GeoTIFF.fromSource(makeFileSource(path), {}, signal); } /** @@ -723,7 +723,7 @@ export async function fromFile(path, signal) { * @returns {Promise} The resulting GeoTIFF file. */ export async function fromBlob(blob, signal) { - return GeoTIFF.fromSource(makeFileReaderSource(blob), signal); + return GeoTIFF.fromSource(makeFileReaderSource(blob),{}, signal); } /** @@ -738,16 +738,16 @@ export async function fromBlob(blob, signal) { * @returns {Promise} The resulting MultiGeoTIFF file. */ export async function fromUrls(mainUrl, overviewUrls = [], options = {}, signal) { - const mainFile = await GeoTIFF.fromSource(makeRemoteSource(mainUrl, options), signal); + const mainFile = await GeoTIFF.fromSource(makeRemoteSource(mainUrl), options, signal); const overviewFiles = await Promise.all( - overviewUrls.map((url) => GeoTIFF.fromSource(makeRemoteSource(url, options))), + overviewUrls.map((url) => GeoTIFF.fromSource(makeRemoteSource(url), options, signal)), ); return new MultiGeoTIFF(mainFile, overviewFiles); } /** - * Main creating function for GeoTIFF files. + * Main creating function for GeoTIFF files. * @param {(Array)} array of pixel values * @returns {metadata} metadata */