Global

Methods

fromArrayBuffer(arrayBuffer, signalopt) → {Promise.<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.<GeoTIFF>

fromBlob(blob, signalopt) → {Promise.<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.<GeoTIFF>

fromFile(path, signalopt) → {Promise.<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.<GeoTIFF>

fromUrl(url, optionsopt, signalopt) → {Promise.<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.<GeoTIFF>

fromUrls(mainUrl, overviewUrls, optionsopt, signalopt) → {Promise.<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.<MultiGeoTIFF>

makeFileReaderSource(file)

Create a new source from a given file/blob.

Parameters:
Name Type Description
file Blob

The file or blob to read from.

Source:
Returns:

The constructed source

makeRemoteSource(url, options)

Parameters:
Name Type Description
url string
options object
Source:

parseByteRanges(responseArrayBuffer, boundary) → {Array.<Object>}

Parses a list of byteranges from the given 'multipart/byteranges' HTTP response. Each item in the list has the following properties:

  • headers: the HTTP headers
  • data: the sliced ArrayBuffer for that specific part
  • offset: the offset of the byterange within its originating file
  • length: the length of the byterange
Parameters:
Name Type Description
responseArrayBuffer ArrayBuffer

the response to be parsed and split

boundary String

the boundary string used to split the sections

Source:
Returns:

the parsed byteranges

Type
Array.<Object>

parseContentRange(rawContentRange) → {Object}

Parse a 'Content-Range' header value to its start, end, and total parts

Parameters:
Name Type Description
rawContentRange String

the raw string to parse from

Source:
Returns:

the parsed parts

Type
Object

parseContentType(rawContentType) → {Object}

Parse a 'Content-Type' header value to the content-type and parameters

Parameters:
Name Type Description
rawContentType String

the raw string to parse from

Source:
Returns:

the parsed content type with the fields: type and params

Type
Object

parseHeaders(text) → {Object}

Parse HTTP headers from a given string.

Parameters:
Name Type Description
text String

the text to parse the headers from

Source:
Returns:

the parsed headers with lowercase keys

Type
Object

setLogger(logger)

Parameters:
Name Type Description
logger object

the new logger. e.g console

Source:

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

CCITTFaxDecoderSource

Type:
  • Object
Properties:
Name Type Description
next function

Method that return one byte of data for decoding, or -1 when EOF is reached.

Source:

Slice

Properties:
Name Type Description
offset number
length number
Source: