Class: GeoTIFF

GeoTIFF(source, littleEndian, bigTiff, firstIFDOffset, optionsopt)

The abstraction for a whole GeoTIFF file.

Constructor

new GeoTIFF(source, littleEndian, bigTiff, firstIFDOffset, optionsopt)

Parameters:
Name Type Attributes Description
source Source

The datasource to read from.

littleEndian Boolean

Whether the image uses little endian.

bigTiff Boolean

Whether the image uses bigTIFF conventions.

firstIFDOffset Number

The numeric byte-offset from the start of the image to the first IFD.

options Object <optional>

further options.

Properties
Name Type Attributes Default Description
cache Boolean <optional>
false

whether or not decoded tiles shall be cached.

Source:

Extends

Methods

(async, static) fromSource(source, options)

Parse a (Geo)TIFF file from the given source.

Parameters:
Name Type Description
source source~Source

The source of data to parse from.

options object

Additional options.

Source:

(async) getImage(indexopt) → {GeoTIFFImage}

Get the n-th internal subfile of an image. By default, the first is returned.

Parameters:
Name Type Attributes Default Description
index Number <optional>
0

the index of the image to return.

Source:
Returns:

the image at the given index

Type
GeoTIFFImage

(async) getImageCount() → {Number}

Returns the count of the internal subfiles.

Source:
Returns:

the number of internal subfile images

Type
Number

(async) readRasters(optionsopt, poolopt, widthopt, heightopt, resampleMethodopt, fillValueopt) → {Promise.<(TypedArray|Array.<TypedArray>)>}

(experimental) Reads raster data from the best fitting image. This function uses the image with the lowest resolution that is still a higher resolution than the requested resolution. When specified, the bbox option is translated to the window option and the resX and resY to width and height respectively. Then, the readRasters method of the selected image is called and the result returned.

Parameters:
Name Type Attributes Default Description
options Object <optional>

optional parameters

Properties
Name Type Attributes Default Description
window Array <optional>
whole image

the subset to read data from.

bbox Array <optional>
whole image

the subset to read data from in geographical coordinates.

samples Array <optional>
all samples

the selection of samples to read from.

interleave Boolean <optional>
false

whether the data shall be read in one single array or separate arrays.

pool Number <optional>
null

The optional decoder pool to use.

width Number <optional>

The desired width of the output. When the width is no the same as the images, resampling will be performed.

height Number <optional>

The desired height of the output. When the width is no the same as the images, resampling will be performed.

resampleMethod String <optional>
'nearest'

The desired resampling method.

fillValue Number | Array.<Number> <optional>

The value to use for parts of the image outside of the images extent. When multiple samples are requested, an array of fill values can be passed.

Inherited From:
Source:
See:
  • GeoTIFFImage.readRasters
Returns:

the decoded arrays as a promise

Type
Promise.<(TypedArray|Array.<TypedArray>)>