@@ -181,7 +181,7 @@ class GeoTIFFBase {
181
181
* image is called and the result returned.
182
182
* @see GeoTIFFImage.readRasters
183
183
* @param {import('./geotiffimage').ReadRasterOptions } [options={}] optional parameters
184
- * @returns {Promise. <(TypedArray|TypedArray[])> } the decoded arrays as a promise
184
+ * @returns {Promise<(TypedArray|TypedArray[])> } the decoded arrays as a promise
185
185
*/
186
186
async readRasters ( options = { } ) {
187
187
const { window : imageWindow , width, height } = options ;
@@ -326,7 +326,7 @@ class GeoTIFF extends GeoTIFFBase {
326
326
* this function must be called with caution (e.g only using the IFD offsets from
327
327
* the headers or other IFDs).
328
328
* @param {number } offset the offset to parse the IFD at
329
- * @returns {ImageFileDirectory } the parsed IFD
329
+ * @returns {Promise< ImageFileDirectory> } the parsed IFD
330
330
*/
331
331
async parseFileDirectoryAt ( offset ) {
332
332
const entrySize = this . bigTiff ? 20 : 12 ;
@@ -455,7 +455,7 @@ class GeoTIFF extends GeoTIFFBase {
455
455
/**
456
456
* Returns the count of the internal subfiles.
457
457
*
458
- * @returns {number } the number of internal subfile images
458
+ * @returns {Promise< number> } the number of internal subfile images
459
459
*/
460
460
async getImageCount ( ) {
461
461
let index = 0 ;
@@ -479,7 +479,7 @@ class GeoTIFF extends GeoTIFFBase {
479
479
/**
480
480
* Get the values of the COG ghost area as a parsed map.
481
481
* See https://gdal.org/drivers/raster/cog.html#header-ghost-area for reference
482
- * @returns {Object } the parsed ghost area or null, if no such area was found
482
+ * @returns {Promise< Object> } the parsed ghost area or null, if no such area was found
483
483
*/
484
484
async getGhostValues ( ) {
485
485
const offset = this . bigTiff ? 16 : 8 ;
@@ -600,7 +600,7 @@ class MultiGeoTIFF extends GeoTIFFBase {
600
600
* Get the n-th internal subfile of an image. By default, the first is returned.
601
601
*
602
602
* @param {number } [index=0] the index of the image to return.
603
- * @returns {GeoTIFFImage } the image at the given index
603
+ * @returns {Promise< GeoTIFFImage> } the image at the given index
604
604
*/
605
605
async getImage ( index = 0 ) {
606
606
await this . getImageCount ( ) ;
@@ -629,7 +629,7 @@ class MultiGeoTIFF extends GeoTIFFBase {
629
629
/**
630
630
* Returns the count of the internal subfiles.
631
631
*
632
- * @returns {number } the number of internal subfile images
632
+ * @returns {Promise< number> } the number of internal subfile images
633
633
*/
634
634
async getImageCount ( ) {
635
635
if ( this . imageCount !== null ) {
@@ -652,7 +652,7 @@ export { MultiGeoTIFF };
652
652
* See {@link makeRemoteSource} for details.
653
653
* @param {AbortSignal } [signal] An AbortSignal that may be signalled if the request is
654
654
* to be aborted
655
- * @returns {Promise. <GeoTIFF> } The resulting GeoTIFF file.
655
+ * @returns {Promise<GeoTIFF> } The resulting GeoTIFF file.
656
656
*/
657
657
export async function fromUrl ( url , options = { } , signal ) {
658
658
return GeoTIFF . fromSource ( makeRemoteSource ( url , options ) , signal ) ;
@@ -680,7 +680,7 @@ export async function fromArrayBuffer(arrayBuffer, signal) {
680
680
* @param {string } path The file path to read from.
681
681
* @param {AbortSignal } [signal] An AbortSignal that may be signalled if the request is
682
682
* to be aborted
683
- * @returns {Promise. <GeoTIFF> } The resulting GeoTIFF file.
683
+ * @returns {Promise<GeoTIFF> } The resulting GeoTIFF file.
684
684
*/
685
685
export async function fromFile ( path , signal ) {
686
686
return GeoTIFF . fromSource ( makeFileSource ( path ) , signal ) ;
@@ -725,7 +725,7 @@ export async function fromUrls(mainUrl, overviewUrls = [], options = {}, signal)
725
725
* @param {(Array) } array of pixel values
726
726
* @returns {metadata } metadata
727
727
*/
728
- export async function writeArrayBuffer ( values , metadata ) {
728
+ export function writeArrayBuffer ( values , metadata ) {
729
729
return writeGeotiff ( values , metadata ) ;
730
730
}
731
731
0 commit comments