Module: geotiff

Classes

GeoTIFF
GeoTIFFBase
GeoTIFFImageIndexError
ImageFileDirectory
MultiGeoTIFF

Methods

(static) fromArrayBuffer(arrayBuffer, signalopt) → {Promise.<module:geotiff~GeoTIFF>}

Construct a new GeoTIFF from an ArrayBuffer.

Parameters:
Name Type Attributes Description
arrayBuffer ArrayBuffer

The data to read the file from.

signal AbortSignal <optional>

An AbortSignal that may be signalled if the request is to be aborted

Source:
Returns:

The resulting GeoTIFF file.

Type
Promise.<module:geotiff~GeoTIFF>

(static) fromBlob(blob, signalopt) → {Promise.<module:geotiff~GeoTIFF>}

Construct a GeoTIFF from an HTML Blob or File object.

Parameters:
Name Type Attributes Description
blob Blob | File

The Blob or File object to read from.

signal AbortSignal <optional>

An AbortSignal that may be signalled if the request is to be aborted

Source:
Returns:

The resulting GeoTIFF file.

Type
Promise.<module:geotiff~GeoTIFF>

(static) fromCustomClient(client, optionsopt, signalopt) → {Promise.<module:geotiff~GeoTIFF>}

Creates a new GeoTIFF from a custom BaseClient.

Parameters:
Name Type Attributes Description
client module:source/client/base.BaseClient

The client.

options object <optional>

Additional options to pass to the source. See makeRemoteSource for details.

signal AbortSignal <optional>

An AbortSignal that may be signalled if the request is to be aborted

Source:
Returns:

The resulting GeoTIFF file.

Type
Promise.<module:geotiff~GeoTIFF>

(static) fromFile(path, signalopt) → {Promise.<module:geotiff~GeoTIFF>}

Construct a GeoTIFF from a local file path. This uses the node filesystem API and is not available on browsers.

N.B. After the GeoTIFF has been completely processed it needs to be closed but only if it has been constructed from a file.

Parameters:
Name Type Attributes Description
path string

The file path to read from.

signal AbortSignal <optional>

An AbortSignal that may be signalled if the request is to be aborted

Source:
Returns:

The resulting GeoTIFF file.

Type
Promise.<module:geotiff~GeoTIFF>

(static) fromUrl(url, optionsopt, signalopt) → {Promise.<module:geotiff~GeoTIFF>}

Creates a new GeoTIFF from a remote URL.

Parameters:
Name Type Attributes Description
url string

The URL to access the image from

options object <optional>

Additional options to pass to the source. See makeRemoteSource for details.

signal AbortSignal <optional>

An AbortSignal that may be signalled if the request is to be aborted

Source:
Returns:

The resulting GeoTIFF file.

Type
Promise.<module:geotiff~GeoTIFF>

(static) fromUrls(mainUrl, overviewUrls, optionsopt, signalopt) → {Promise.<module:geotiff~MultiGeoTIFF>}

Construct a MultiGeoTIFF from the given URLs.

Parameters:
Name Type Attributes Description
mainUrl string

The URL for the main file.

overviewUrls Array.<string>

An array of URLs for the overview images.

options Object <optional>

Additional options to pass to the source. See makeRemoteSource for details.

signal AbortSignal <optional>

An AbortSignal that may be signalled if the request is to be aborted

Source:
Returns:

The resulting MultiGeoTIFF file.

Type
Promise.<module:geotiff~MultiGeoTIFF>

(static) writeArrayBuffer(array) → {metadata}

Main creating function for GeoTIFF files.

Parameters:
Name Type Description
array Array

of pixel values

Source:
Returns:

metadata

Type
metadata

Type Definitions

Dimensions

Type:
  • Object
Source:

GeoTIFFOptions

Type:
  • Object
Properties:
Name Type Attributes Default Description
cache boolean <optional>
false

whether or not decoded tiles shall be cached.

Source:

ReadRasterResult

The autogenerated docs are a little confusing here. The effective type is:

(TypedArray | TypedArray[]) & { height: number; width: number}

Type:
Source:

TypedArray

Type:
  • Uint8Array | Int8Array | Uint16Array | Int16Array | Uint32Array | Int32Array | Float32Array | Float64Array
Source:

TypedArrayArrayWithDimensions

The autogenerated docs are a little confusing here. The effective type is:

TypedArray[] & { height: number; width: number}

Type:
Source:

TypedArrayWithDimensions

The autogenerated docs are a little confusing here. The effective type is:

TypedArray & { height: number; width: number}

Type:
Source: