diff --git a/.gitignore b/.gitignore index b3fad844..596703fb 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ node_modules dist dist-node dist-browser +docs .DS_Store \ No newline at end of file diff --git a/docs/GeoTIFF.html b/docs/GeoTIFF.html deleted file mode 100644 index 56343a9b..00000000 --- a/docs/GeoTIFF.html +++ /dev/null @@ -1,1925 +0,0 @@ - - - - - JSDoc: Class: GeoTIFF - - - - - - - - - - -
- -

Class: GeoTIFF

- - - - - - -
- -
- -

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

- -

The abstraction for a whole GeoTIFF file.

- - -
- -
-
- - - - -

Constructor

- - - -

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

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
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
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
cache - - -Boolean - - - - - - <optional>
- - - - - -
- - false - -

whether or not decoded tiles shall be cached.

- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - -

Extends

- - - - - - - - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

(async, static) fromSource(source, options, signalopt)

- - - - - - -
-

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

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
source - - -source~Source - - - - - - - - - -

The source of data to parse from.

options - - -object - - - - - - - - - -

Additional options.

signal - - -AbortSignal - - - - - - <optional>
- - - - - -

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

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

close()

- - - - - - -
-

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

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

(async) getGhostValues() → {Object}

- - - - - - -
-

Get the values of the COG ghost area as a parsed map. -See https://gdal.org/drivers/raster/cog.html#header-ghost-area for reference

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

the parsed ghost area or null, if no such area was found

-
- - - -
-
- Type -
-
- -Object - - -
-
- - - - - - - - - - - - - -

(async) getImage(indexopt) → {GeoTIFFImage}

- - - - - - -
-

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

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
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) parseFileDirectoryAt(offset) → {ImageFileDirectory}

- - - - - - -
-

Instructs to parse an image file directory at the given file offset. -As there is no way to ensure that a location is indeed the start of an IFD, -this function must be called with caution (e.g only using the IFD offsets from -the headers or other IFDs).

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
offset - - -number - - - -

the offset to parse the IFD at

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

the parsed IFD

-
- - - -
-
- Type -
-
- -ImageFileDirectory - - -
-
- - - - - - - - - - - - - -

(async) readRasters(optionsopt) → {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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
options - - -Object - - - - - - <optional>
- - - - - -
- - {} - -

optional parameters

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
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 not the -same as the images, resampling will be performed.

height - - -Number - - - - - - <optional>
- - - - - -
- -

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

resampleMethod - - -String - - - - - - <optional>
- - - - - -
- - 'nearest' - -

The desired resampling method.

signal - - -AbortSignal - - - - - - <optional>
- - - - - -
- -

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

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.

- -
- - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - -
See:
-
-
    -
  • GeoTIFFImage.readRasters
  • -
-
- - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

the decoded arrays as a promise

-
- - - -
-
- Type -
-
- -Promise.<(TypedArray|Array.<TypedArray>)> - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/GeoTIFFImage.html b/docs/GeoTIFFImage.html deleted file mode 100644 index 50a73747..00000000 --- a/docs/GeoTIFFImage.html +++ /dev/null @@ -1,3466 +0,0 @@ - - - - - JSDoc: Class: GeoTIFFImage - - - - - - - - - - -
- -

Class: GeoTIFFImage

- - - - - - -
- -
- -

GeoTIFFImage(fileDirectory, geoKeys, dataView, littleEndian, cache, source)

- -

GeoTIFF sub-file image.

- - -
- -
-
- - - - -

Constructor

- - - -

new GeoTIFFImage(fileDirectory, geoKeys, dataView, littleEndian, cache, source)

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
fileDirectory - - -Object - - - -

The parsed file directory

geoKeys - - -Object - - - -

The parsed geo-keys

dataView - - -DataView - - - -

The DataView for the underlying file.

littleEndian - - -Boolean - - - -

Whether the file is encoded in little or big endian

cache - - -Boolean - - - -

Whether or not decoded tiles shall be cached

source - - -Source - - - -

The datasource to read from

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

getBoundingBox() → {Array}

- - - - - - -
-

Returns the image bounding box as an array of 4 values: min-x, min-y, -max-x and max-y. When the image has no affine transformation, then an -exception is thrown.

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

The bounding box

-
- - - -
-
- Type -
-
- -Array - - -
-
- - - - - - - - - - - - - -

getBytesPerPixel() → {Number}

- - - - - - -
-

Calculates the number of bytes for each pixel across all samples. Only full -bytes are supported, an exception is thrown when this is not the case.

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

the bytes per pixel

-
- - - -
-
- Type -
-
- -Number - - -
-
- - - - - - - - - - - - - -

getFileDirectory() → {Object}

- - - - - - -
-

Returns the associated parsed file directory.

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

the parsed file directory

-
- - - -
-
- Type -
-
- -Object - - -
-
- - - - - - - - - - - - - -

getGDALMetadata(sampleopt) → {Object}

- - - - - - -
-

Returns the parsed GDAL metadata items.

-

If sample is passed to null, dataset-level metadata will be returned. -Otherwise only metadata specific to the provided sample will be returned.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
sample - - -Number - - - - - - <optional>
- - - - - -
- - null - -

The sample index.

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Object - - -
-
- - - - - - - - - - - - - -

getGDALNoData() → {Number}

- - - - - - -
-

Returns the GDAL nodata value

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

or null

-
- - - -
-
- Type -
-
- -Number - - -
-
- - - - - - - - - - - - - -

getGeoKeys() → {Object}

- - - - - - -
-

Returns the associated parsed geo keys.

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

the parsed geo keys

-
- - - -
-
- Type -
-
- -Object - - -
-
- - - - - - - - - - - - - -

getHeight() → {Number}

- - - - - - -
-

Returns the height of the image.

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

the height of the image

-
- - - -
-
- Type -
-
- -Number - - -
-
- - - - - - - - - - - - - -

getOrigin() → {Array}

- - - - - - -
-

Returns the image origin as a XYZ-vector. When the image has no affine -transformation, then an exception is thrown.

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

The origin as a vector

-
- - - -
-
- Type -
-
- -Array - - -
-
- - - - - - - - - - - - - -

getResolution(referenceImageopt) → {Array}

- - - - - - -
-

Returns the image resolution as a XYZ-vector. When the image has no affine -transformation, then an exception is thrown.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
referenceImage - - -GeoTIFFImage - - - - - - <optional>
- - - - - -
- - null - -

A reference image to calculate the resolution from -in cases when the current image does not have the -required tags on its own.

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

The resolution as a vector

-
- - - -
-
- Type -
-
- -Array - - -
-
- - - - - - - - - - - - - -

getSamplesPerPixel() → {Number}

- - - - - - -
-

Returns the number of samples per pixel.

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

the number of samples per pixel

-
- - - -
-
- Type -
-
- -Number - - -
-
- - - - - - - - - - - - - -

getTiePoints() → {Array.<Object>}

- - - - - - -
-

Returns an array of tiepoints.

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Array.<Object> - - -
-
- - - - - - - - - - - - - -

getTileHeight() → {Number}

- - - - - - -
-

Returns the height of each tile.

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

the height of each tile

-
- - - -
-
- Type -
-
- -Number - - -
-
- - - - - - - - - - - - - -

(async) getTileOrStrip(x, y, sample, poolOrDecoder, signalopt) → {Promise.<ArrayBuffer>}

- - - - - - -
-

Returns the decoded strip or tile.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
x - - -Number - - - - - - - - - -

the strip or tile x-offset

y - - -Number - - - - - - - - - -

the tile y-offset (0 for stripped images)

sample - - -Number - - - - - - - - - -

the sample to get for separated samples

poolOrDecoder - - -Pool -| - -AbstractDecoder - - - - - - - - - -

the decoder or decoder pool

signal - - -AbortSignal - - - - - - <optional>
- - - - - -

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

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - - - -
-
- Type -
-
- -Promise.<ArrayBuffer> - - -
-
- - - - - - - - - - - - - -

getTileWidth() → {Number}

- - - - - - -
-

Returns the width of each tile.

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

the width of each tile

-
- - - -
-
- Type -
-
- -Number - - -
-
- - - - - - - - - - - - - -

getWidth() → {Number}

- - - - - - -
-

Returns the width of the image.

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

the width of the image

-
- - - -
-
- Type -
-
- -Number - - -
-
- - - - - - - - - - - - - -

pixelIsArea() → {Boolean}

- - - - - - -
-

Returns whether or not the pixels of the image depict an area (or point).

-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

Whether the pixels are a point

-
- - - -
-
- Type -
-
- -Boolean - - -
-
- - - - - - - - - - - - - -

(async) readRasters(optionsopt) → {Promise.<(TypedArray|Array.<TypedArray>)>}

- - - - - - -
-

Reads raster data from the image. This function reads all selected samples -into separate arrays of the correct type for that sample or into a single -combined array when interleave is set. When provided, only a subset -of the raster is read for each sample.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
options - - -Object - - - - - - <optional>
- - - - - -
- - {} - -

optional parameters

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
window - - -Array - - - - - - <optional>
- - - - - -
- - whole image - -

the subset to read data from.

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 -not the same as the images, resampling will be -performed.

height - - -number - - - - - - <optional>
- - - - - -
- -

The desired height of the output. When the width -is not 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.

signal - - -AbortSignal - - - - - - <optional>
- - - - - -
- -

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

- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

the decoded arrays as a promise

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

(async) readRGB(optionsopt) → {Promise.<(TypedArray|Array.<TypedArray>)>}

- - - - - - -
-

Reads raster data from the image as RGB. The result is always an -interleaved typed array. -Colorspaces other than RGB will be transformed to RGB, color maps expanded. -When no other method is applicable, the first sample is used to produce a -greayscale image. -When provided, only a subset of the raster is read for each sample.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
options - - -Object - - - - - - <optional>
- - - - - -

optional parameters

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
window - - -Array - - - - - - <optional>
- - - - - -
- - whole image - -

the subset to read data from.

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.

enableAlpha - - -bool - - - - - - <optional>
- - - - - -
- - false - -

Enable reading alpha channel if present.

signal - - -AbortSignal - - - - - - <optional>
- - - - - -
- -

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

- -
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

the RGB array as a Promise

-
- - - -
-
- Type -
-
- -Promise.<(TypedArray|Array.<TypedArray>)> - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/MultiGeoTIFF.html b/docs/MultiGeoTIFF.html deleted file mode 100644 index f7589d76..00000000 --- a/docs/MultiGeoTIFF.html +++ /dev/null @@ -1,1171 +0,0 @@ - - - - - JSDoc: Class: MultiGeoTIFF - - - - - - - - - - -
- -

Class: MultiGeoTIFF

- - - - - - -
- -
- -

MultiGeoTIFF(mainFile, overviewFiles)

- -

Wrapper for GeoTIFF files that have external overviews.

- - -
- -
-
- - - - -

Constructor

- - - -

new MultiGeoTIFF(mainFile, overviewFiles)

- - - - - - -
-

Construct a new MultiGeoTIFF from a main and several overview files.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
mainFile - - -GeoTIFF - - - -

The main GeoTIFF file.

overviewFiles - - -Array.<GeoTIFF> - - - -

An array of overview files.

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - -

Extends

- - - - - - - - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

(async) getImage(indexopt) → {GeoTIFFImage}

- - - - - - -
-

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

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
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) → {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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
options - - -Object - - - - - - <optional>
- - - - - -
- - {} - -

optional parameters

-
Properties
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
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 not the -same as the images, resampling will be performed.

height - - -Number - - - - - - <optional>
- - - - - -
- -

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

resampleMethod - - -String - - - - - - <optional>
- - - - - -
- - 'nearest' - -

The desired resampling method.

signal - - -AbortSignal - - - - - - <optional>
- - - - - -
- -

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

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.

- -
- - - - - - -
- - - - - - - - -
Overrides:
-
- - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - -
See:
-
-
    -
  • GeoTIFFImage.readRasters
  • -
-
- - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

the decoded arrays as a promise

-
- - - -
-
- Type -
-
- -Promise.<(TypedArray|Array.<TypedArray>)> - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/fonts/OpenSans-Bold-webfont.eot b/docs/fonts/OpenSans-Bold-webfont.eot deleted file mode 100644 index 5d20d916..00000000 Binary files a/docs/fonts/OpenSans-Bold-webfont.eot and /dev/null differ diff --git a/docs/fonts/OpenSans-Bold-webfont.svg b/docs/fonts/OpenSans-Bold-webfont.svg deleted file mode 100644 index 3ed7be4b..00000000 --- a/docs/fonts/OpenSans-Bold-webfont.svg +++ /dev/null @@ -1,1830 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/fonts/OpenSans-Bold-webfont.woff b/docs/fonts/OpenSans-Bold-webfont.woff deleted file mode 100644 index 1205787b..00000000 Binary files a/docs/fonts/OpenSans-Bold-webfont.woff and /dev/null differ diff --git a/docs/fonts/OpenSans-BoldItalic-webfont.eot b/docs/fonts/OpenSans-BoldItalic-webfont.eot deleted file mode 100644 index 1f639a15..00000000 Binary files a/docs/fonts/OpenSans-BoldItalic-webfont.eot and /dev/null differ diff --git a/docs/fonts/OpenSans-BoldItalic-webfont.svg b/docs/fonts/OpenSans-BoldItalic-webfont.svg deleted file mode 100644 index 6a2607b9..00000000 --- a/docs/fonts/OpenSans-BoldItalic-webfont.svg +++ /dev/null @@ -1,1830 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/fonts/OpenSans-BoldItalic-webfont.woff b/docs/fonts/OpenSans-BoldItalic-webfont.woff deleted file mode 100644 index ed760c06..00000000 Binary files a/docs/fonts/OpenSans-BoldItalic-webfont.woff and /dev/null differ diff --git a/docs/fonts/OpenSans-Italic-webfont.eot b/docs/fonts/OpenSans-Italic-webfont.eot deleted file mode 100644 index 0c8a0ae0..00000000 Binary files a/docs/fonts/OpenSans-Italic-webfont.eot and /dev/null differ diff --git a/docs/fonts/OpenSans-Italic-webfont.svg b/docs/fonts/OpenSans-Italic-webfont.svg deleted file mode 100644 index e1075dcc..00000000 --- a/docs/fonts/OpenSans-Italic-webfont.svg +++ /dev/null @@ -1,1830 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/fonts/OpenSans-Italic-webfont.woff b/docs/fonts/OpenSans-Italic-webfont.woff deleted file mode 100644 index ff652e64..00000000 Binary files a/docs/fonts/OpenSans-Italic-webfont.woff and /dev/null differ diff --git a/docs/fonts/OpenSans-Light-webfont.eot b/docs/fonts/OpenSans-Light-webfont.eot deleted file mode 100644 index 14868406..00000000 Binary files a/docs/fonts/OpenSans-Light-webfont.eot and /dev/null differ diff --git a/docs/fonts/OpenSans-Light-webfont.svg b/docs/fonts/OpenSans-Light-webfont.svg deleted file mode 100644 index 11a472ca..00000000 --- a/docs/fonts/OpenSans-Light-webfont.svg +++ /dev/null @@ -1,1831 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/fonts/OpenSans-Light-webfont.woff b/docs/fonts/OpenSans-Light-webfont.woff deleted file mode 100644 index e7860748..00000000 Binary files a/docs/fonts/OpenSans-Light-webfont.woff and /dev/null differ diff --git a/docs/fonts/OpenSans-LightItalic-webfont.eot b/docs/fonts/OpenSans-LightItalic-webfont.eot deleted file mode 100644 index 8f445929..00000000 Binary files a/docs/fonts/OpenSans-LightItalic-webfont.eot and /dev/null differ diff --git a/docs/fonts/OpenSans-LightItalic-webfont.svg b/docs/fonts/OpenSans-LightItalic-webfont.svg deleted file mode 100644 index 431d7e35..00000000 --- a/docs/fonts/OpenSans-LightItalic-webfont.svg +++ /dev/null @@ -1,1835 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/fonts/OpenSans-LightItalic-webfont.woff b/docs/fonts/OpenSans-LightItalic-webfont.woff deleted file mode 100644 index 43e8b9e6..00000000 Binary files a/docs/fonts/OpenSans-LightItalic-webfont.woff and /dev/null differ diff --git a/docs/fonts/OpenSans-Regular-webfont.eot b/docs/fonts/OpenSans-Regular-webfont.eot deleted file mode 100644 index 6bbc3cf5..00000000 Binary files a/docs/fonts/OpenSans-Regular-webfont.eot and /dev/null differ diff --git a/docs/fonts/OpenSans-Regular-webfont.svg b/docs/fonts/OpenSans-Regular-webfont.svg deleted file mode 100644 index 25a39523..00000000 --- a/docs/fonts/OpenSans-Regular-webfont.svg +++ /dev/null @@ -1,1831 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/fonts/OpenSans-Regular-webfont.woff b/docs/fonts/OpenSans-Regular-webfont.woff deleted file mode 100644 index e231183d..00000000 Binary files a/docs/fonts/OpenSans-Regular-webfont.woff and /dev/null differ diff --git a/docs/geotiff.js.html b/docs/geotiff.js.html deleted file mode 100644 index 5ed5b43e..00000000 --- a/docs/geotiff.js.html +++ /dev/null @@ -1,794 +0,0 @@ - - - - - JSDoc: Source: geotiff.js - - - - - - - - - - -
- -

Source: geotiff.js

- - - - - - -
-
-
import GeoTIFFImage from './geotiffimage';
-import DataView64 from './dataview64';
-import DataSlice from './dataslice';
-import Pool from './pool';
-
-import { makeRemoteSource } from './source/remote';
-import { makeBufferSource } from './source/arraybuffer';
-import { makeFileReaderSource } from './source/filereader';
-import { makeFileSource } from './source/file';
-
-import { fieldTypes, fieldTagNames, arrayFields, geoKeyNames } from './globals';
-import { writeGeotiff } from './geotiffwriter';
-import * as globals from './globals';
-import * as rgb from './rgb';
-import { getDecoder } from './compression';
-import { setLogger } from './logging';
-
-export { globals };
-export { rgb };
-export { getDecoder };
-export { setLogger };
-
-function getFieldTypeLength(fieldType) {
-  switch (fieldType) {
-    case fieldTypes.BYTE: case fieldTypes.ASCII: case fieldTypes.SBYTE: case fieldTypes.UNDEFINED:
-      return 1;
-    case fieldTypes.SHORT: case fieldTypes.SSHORT:
-      return 2;
-    case fieldTypes.LONG: case fieldTypes.SLONG: case fieldTypes.FLOAT: case fieldTypes.IFD:
-      return 4;
-    case fieldTypes.RATIONAL: case fieldTypes.SRATIONAL: case fieldTypes.DOUBLE:
-    case fieldTypes.LONG8: case fieldTypes.SLONG8: case fieldTypes.IFD8:
-      return 8;
-    default:
-      throw new RangeError(`Invalid field type: ${fieldType}`);
-  }
-}
-
-function parseGeoKeyDirectory(fileDirectory) {
-  const rawGeoKeyDirectory = fileDirectory.GeoKeyDirectory;
-  if (!rawGeoKeyDirectory) {
-    return null;
-  }
-
-  const geoKeyDirectory = {};
-  for (let i = 4; i <= rawGeoKeyDirectory[3] * 4; i += 4) {
-    const key = geoKeyNames[rawGeoKeyDirectory[i]];
-    const location = (rawGeoKeyDirectory[i + 1])
-      ? (fieldTagNames[rawGeoKeyDirectory[i + 1]]) : null;
-    const count = rawGeoKeyDirectory[i + 2];
-    const offset = rawGeoKeyDirectory[i + 3];
-
-    let value = null;
-    if (!location) {
-      value = offset;
-    } else {
-      value = fileDirectory[location];
-      if (typeof value === 'undefined' || value === null) {
-        throw new Error(`Could not get value of geoKey '${key}'.`);
-      } else if (typeof value === 'string') {
-        value = value.substring(offset, offset + count - 1);
-      } else if (value.subarray) {
-        value = value.subarray(offset, offset + count);
-        if (count === 1) {
-          value = value[0];
-        }
-      }
-    }
-    geoKeyDirectory[key] = value;
-  }
-  return geoKeyDirectory;
-}
-
-function getValues(dataSlice, fieldType, count, offset) {
-  let values = null;
-  let readMethod = null;
-  const fieldTypeLength = getFieldTypeLength(fieldType);
-
-  switch (fieldType) {
-    case fieldTypes.BYTE: case fieldTypes.ASCII: case fieldTypes.UNDEFINED:
-      values = new Uint8Array(count); readMethod = dataSlice.readUint8;
-      break;
-    case fieldTypes.SBYTE:
-      values = new Int8Array(count); readMethod = dataSlice.readInt8;
-      break;
-    case fieldTypes.SHORT:
-      values = new Uint16Array(count); readMethod = dataSlice.readUint16;
-      break;
-    case fieldTypes.SSHORT:
-      values = new Int16Array(count); readMethod = dataSlice.readInt16;
-      break;
-    case fieldTypes.LONG: case fieldTypes.IFD:
-      values = new Uint32Array(count); readMethod = dataSlice.readUint32;
-      break;
-    case fieldTypes.SLONG:
-      values = new Int32Array(count); readMethod = dataSlice.readInt32;
-      break;
-    case fieldTypes.LONG8: case fieldTypes.IFD8:
-      values = new Array(count); readMethod = dataSlice.readUint64;
-      break;
-    case fieldTypes.SLONG8:
-      values = new Array(count); readMethod = dataSlice.readInt64;
-      break;
-    case fieldTypes.RATIONAL:
-      values = new Uint32Array(count * 2); readMethod = dataSlice.readUint32;
-      break;
-    case fieldTypes.SRATIONAL:
-      values = new Int32Array(count * 2); readMethod = dataSlice.readInt32;
-      break;
-    case fieldTypes.FLOAT:
-      values = new Float32Array(count); readMethod = dataSlice.readFloat32;
-      break;
-    case fieldTypes.DOUBLE:
-      values = new Float64Array(count); readMethod = dataSlice.readFloat64;
-      break;
-    default:
-      throw new RangeError(`Invalid field type: ${fieldType}`);
-  }
-
-  // normal fields
-  if (!(fieldType === fieldTypes.RATIONAL || fieldType === fieldTypes.SRATIONAL)) {
-    for (let i = 0; i < count; ++i) {
-      values[i] = readMethod.call(
-        dataSlice, offset + (i * fieldTypeLength),
-      );
-    }
-  } else { // RATIONAL or SRATIONAL
-    for (let i = 0; i < count; i += 2) {
-      values[i] = readMethod.call(
-        dataSlice, offset + (i * fieldTypeLength),
-      );
-      values[i + 1] = readMethod.call(
-        dataSlice, offset + ((i * fieldTypeLength) + 4),
-      );
-    }
-  }
-
-  if (fieldType === fieldTypes.ASCII) {
-    return new TextDecoder('utf-8').decode(values);
-  }
-  return values;
-}
-
-/**
- * Data class to store the parsed file directory, geo key directory and
- * offset to the next IFD
- */
-class ImageFileDirectory {
-  constructor(fileDirectory, geoKeyDirectory, nextIFDByteOffset) {
-    this.fileDirectory = fileDirectory;
-    this.geoKeyDirectory = geoKeyDirectory;
-    this.nextIFDByteOffset = nextIFDByteOffset;
-  }
-}
-
-/**
- * Error class for cases when an IFD index was requested, that does not exist
- * in the file.
- */
-class GeoTIFFImageIndexError extends Error {
-  constructor(index) {
-    super(`No image at index ${index}`);
-    this.index = index;
-  }
-}
-
-
-class GeoTIFFBase {
-  /**
-   * (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]{@link GeoTIFFImage#readRasters} method of the selected
-   * image is called and the result returned.
-   * @see GeoTIFFImage.readRasters
-   * @param {Object} [options={}] optional parameters
-   * @param {Array} [options.window=whole image] the subset to read data from.
-   * @param {Array} [options.bbox=whole image] the subset to read data from in
-   *                                           geographical coordinates.
-   * @param {Array} [options.samples=all samples] the selection of samples to read from.
-   * @param {Boolean} [options.interleave=false] whether the data shall be read
-   *                                             in one single array or separate
-   *                                             arrays.
-   * @param {Number} [options.pool=null] The optional decoder pool to use.
-   * @param {Number} [options.width] The desired width of the output. When the width is not the
-   *                                 same as the images, resampling will be performed.
-   * @param {Number} [options.height] The desired height of the output. When the width is not the
-   *                                  same as the images, resampling will be performed.
-   * @param {String} [options.resampleMethod='nearest'] The desired resampling method.
-   * @param {AbortSignal} [options.signal] An AbortSignal that may be signalled if the request is
-   *                                       to be aborted
-   * @param {Number|Number[]} [options.fillValue] 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.
-   * @returns {Promise.<(TypedArray|TypedArray[])>} the decoded arrays as a promise
-   */
-  async readRasters(options = {}) {
-    const { window: imageWindow, width, height } = options;
-    let { resX, resY, bbox } = options;
-
-    const firstImage = await this.getImage();
-    let usedImage = firstImage;
-    const imageCount = await this.getImageCount();
-    const imgBBox = firstImage.getBoundingBox();
-
-    if (imageWindow && bbox) {
-      throw new Error('Both "bbox" and "window" passed.');
-    }
-
-    // if width/height is passed, transform it to resolution
-    if (width || height) {
-      // if we have an image window (pixel coordinates), transform it to a BBox
-      // using the origin/resolution of the first image.
-      if (imageWindow) {
-        const [oX, oY] = firstImage.getOrigin();
-        const [rX, rY] = firstImage.getResolution();
-
-        bbox = [
-          oX + (imageWindow[0] * rX),
-          oY + (imageWindow[1] * rY),
-          oX + (imageWindow[2] * rX),
-          oY + (imageWindow[3] * rY),
-        ];
-      }
-
-      // if we have a bbox (or calculated one)
-
-      const usedBBox = bbox || imgBBox;
-
-      if (width) {
-        if (resX) {
-          throw new Error('Both width and resX passed');
-        }
-        resX = (usedBBox[2] - usedBBox[0]) / width;
-      }
-      if (height) {
-        if (resY) {
-          throw new Error('Both width and resY passed');
-        }
-        resY = (usedBBox[3] - usedBBox[1]) / height;
-      }
-    }
-
-    // if resolution is set or calculated, try to get the image with the worst acceptable resolution
-    if (resX || resY) {
-      const allImages = [];
-      for (let i = 0; i < imageCount; ++i) {
-        const image = await this.getImage(i);
-        const { SubfileType: subfileType, NewSubfileType: newSubfileType } = image.fileDirectory;
-        if (i === 0 || subfileType === 2 || newSubfileType & 1) {
-          allImages.push(image);
-        }
-      }
-
-      allImages.sort((a, b) => a.getWidth() - b.getWidth());
-      for (let i = 0; i < allImages.length; ++i) {
-        const image = allImages[i];
-        const imgResX = (imgBBox[2] - imgBBox[0]) / image.getWidth();
-        const imgResY = (imgBBox[3] - imgBBox[1]) / image.getHeight();
-
-        usedImage = image;
-        if ((resX && resX > imgResX) || (resY && resY > imgResY)) {
-          break;
-        }
-      }
-    }
-
-    let wnd = imageWindow;
-    if (bbox) {
-      const [oX, oY] = firstImage.getOrigin();
-      const [imageResX, imageResY] = usedImage.getResolution(firstImage);
-
-      wnd = [
-        Math.round((bbox[0] - oX) / imageResX),
-        Math.round((bbox[1] - oY) / imageResY),
-        Math.round((bbox[2] - oX) / imageResX),
-        Math.round((bbox[3] - oY) / imageResY),
-      ];
-      wnd = [
-        Math.min(wnd[0], wnd[2]),
-        Math.min(wnd[1], wnd[3]),
-        Math.max(wnd[0], wnd[2]),
-        Math.max(wnd[1], wnd[3]),
-      ];
-    }
-
-    return usedImage.readRasters({ ...options, window: wnd });
-  }
-}
-
-
-/**
- * The abstraction for a whole GeoTIFF file.
- * @augments GeoTIFFBase
- */
-class GeoTIFF extends GeoTIFFBase {
-  /**
-   * @constructor
-   * @param {Source} source The datasource to read from.
-   * @param {Boolean} littleEndian Whether the image uses little endian.
-   * @param {Boolean} bigTiff Whether the image uses bigTIFF conventions.
-   * @param {Number} firstIFDOffset The numeric byte-offset from the start of the image
-   *                                to the first IFD.
-   * @param {Object} [options] further options.
-   * @param {Boolean} [options.cache=false] whether or not decoded tiles shall be cached.
-   */
-  constructor(source, littleEndian, bigTiff, firstIFDOffset, options = {}) {
-    super();
-    this.source = source;
-    this.littleEndian = littleEndian;
-    this.bigTiff = bigTiff;
-    this.firstIFDOffset = firstIFDOffset;
-    this.cache = options.cache || false;
-    this.ifdRequests = [];
-    this.ghostValues = null;
-  }
-
-  async getSlice(offset, size) {
-    const fallbackSize = this.bigTiff ? 4048 : 1024;
-    return new DataSlice(
-      (await this.source.fetch([{
-        offset,
-        length: typeof size !== 'undefined' ? size : fallbackSize,
-      }]))[0],
-      offset,
-      this.littleEndian,
-      this.bigTiff,
-    );
-  }
-
-  /**
-   * Instructs to parse an image file directory at the given file offset.
-   * As there is no way to ensure that a location is indeed the start of an IFD,
-   * this function must be called with caution (e.g only using the IFD offsets from
-   * the headers or other IFDs).
-   * @param {number} offset the offset to parse the IFD at
-   * @returns {ImageFileDirectory} the parsed IFD
-   */
-  async parseFileDirectoryAt(offset) {
-    const entrySize = this.bigTiff ? 20 : 12;
-    const offsetSize = this.bigTiff ? 8 : 2;
-
-    let dataSlice = await this.getSlice(offset);
-    const numDirEntries = this.bigTiff ?
-      dataSlice.readUint64(offset) :
-      dataSlice.readUint16(offset);
-
-    // if the slice does not cover the whole IFD, request a bigger slice, where the
-    // whole IFD fits: num of entries + n x tag length + offset to next IFD
-    const byteSize = (numDirEntries * entrySize) + (this.bigTiff ? 16 : 6);
-    if (!dataSlice.covers(offset, byteSize)) {
-      dataSlice = await this.getSlice(offset, byteSize);
-    }
-
-    const fileDirectory = {};
-
-    // loop over the IFD and create a file directory object
-    let i = offset + (this.bigTiff ? 8 : 2);
-    for (let entryCount = 0; entryCount < numDirEntries; i += entrySize, ++entryCount) {
-      const fieldTag = dataSlice.readUint16(i);
-      const fieldType = dataSlice.readUint16(i + 2);
-      const typeCount = this.bigTiff ?
-        dataSlice.readUint64(i + 4) :
-        dataSlice.readUint32(i + 4);
-
-      let fieldValues;
-      let value;
-      const fieldTypeLength = getFieldTypeLength(fieldType);
-      const valueOffset = i + (this.bigTiff ? 12 : 8);
-
-      // check whether the value is directly encoded in the tag or refers to a
-      // different external byte range
-      if (fieldTypeLength * typeCount <= (this.bigTiff ? 8 : 4)) {
-        fieldValues = getValues(dataSlice, fieldType, typeCount, valueOffset);
-      } else {
-        // resolve the reference to the actual byte range
-        const actualOffset = dataSlice.readOffset(valueOffset);
-        const length = getFieldTypeLength(fieldType) * typeCount;
-
-        // check, whether we actually cover the referenced byte range; if not,
-        // request a new slice of bytes to read from it
-        if (dataSlice.covers(actualOffset, length)) {
-          fieldValues = getValues(dataSlice, fieldType, typeCount, actualOffset);
-        } else {
-          const fieldDataSlice = await this.getSlice(actualOffset, length);
-          fieldValues = getValues(fieldDataSlice, fieldType, typeCount, actualOffset);
-        }
-      }
-
-      // unpack single values from the array
-      if (typeCount === 1 && arrayFields.indexOf(fieldTag) === -1 &&
-        !(fieldType === fieldTypes.RATIONAL || fieldType === fieldTypes.SRATIONAL)) {
-        value = fieldValues[0];
-      } else {
-        value = fieldValues;
-      }
-
-      // write the tags value to the file directly
-      fileDirectory[fieldTagNames[fieldTag]] = value;
-    }
-    const geoKeyDirectory = parseGeoKeyDirectory(fileDirectory);
-    const nextIFDByteOffset = dataSlice.readOffset(
-      offset + offsetSize + (entrySize * numDirEntries),
-    );
-
-    return new ImageFileDirectory(
-      fileDirectory,
-      geoKeyDirectory,
-      nextIFDByteOffset,
-    );
-  }
-
-  async requestIFD(index) {
-    // see if we already have that IFD index requested.
-    if (this.ifdRequests[index]) {
-      // attach to an already requested IFD
-      return this.ifdRequests[index];
-    } else if (index === 0) {
-      // special case for index 0
-      this.ifdRequests[index] = this.parseFileDirectoryAt(this.firstIFDOffset);
-      return this.ifdRequests[index];
-    } else if (!this.ifdRequests[index - 1]) {
-      // if the previous IFD was not yet loaded, load that one first
-      // this is the recursive call.
-      try {
-        this.ifdRequests[index - 1] = this.requestIFD(index - 1);
-      } catch (e) {
-        // if the previous one already was an index error, rethrow
-        // with the current index
-        if (e instanceof GeoTIFFImageIndexError) {
-          throw new GeoTIFFImageIndexError(index);
-        }
-        // rethrow anything else
-        throw e;
-      }
-    }
-    // if the previous IFD was loaded, we can finally fetch the one we are interested in.
-    // we need to wrap this in an IIFE, otherwise this.ifdRequests[index] would be delayed
-    this.ifdRequests[index] = (async () => {
-      const previousIfd = await this.ifdRequests[index - 1];
-      if (previousIfd.nextIFDByteOffset === 0) {
-        throw new GeoTIFFImageIndexError(index);
-      }
-      return this.parseFileDirectoryAt(previousIfd.nextIFDByteOffset);
-    })();
-    return this.ifdRequests[index];
-  }
-
-  /**
-   * Get the n-th internal subfile of an image. By default, the first is returned.
-   *
-   * @param {Number} [index=0] the index of the image to return.
-   * @returns {GeoTIFFImage} the image at the given index
-   */
-  async getImage(index = 0) {
-    const ifd = await this.requestIFD(index);
-    return new GeoTIFFImage(
-      ifd.fileDirectory, ifd.geoKeyDirectory,
-      this.dataView, this.littleEndian, this.cache, this.source,
-    );
-  }
-
-  /**
-   * Returns the count of the internal subfiles.
-   *
-   * @returns {Number} the number of internal subfile images
-   */
-  async getImageCount() {
-    let index = 0;
-    // loop until we run out of IFDs
-    let hasNext = true;
-    while (hasNext) {
-      try {
-        await this.requestIFD(index);
-        ++index;
-      } catch (e) {
-        if (e instanceof GeoTIFFImageIndexError) {
-          hasNext = false;
-        } else {
-          throw e;
-        }
-      }
-    }
-    return index;
-  }
-
-  /**
-   * Get the values of the COG ghost area as a parsed map.
-   * See https://gdal.org/drivers/raster/cog.html#header-ghost-area for reference
-   * @returns {Object} the parsed ghost area or null, if no such area was found
-   */
-  async getGhostValues() {
-    const offset = this.bigTiff ? 16 : 8;
-    if (this.ghostValues) {
-      return this.ghostValues;
-    }
-    const detectionString = 'GDAL_STRUCTURAL_METADATA_SIZE=';
-    const heuristicAreaSize = detectionString.length + 100;
-    let slice = await this.getSlice(offset, heuristicAreaSize);
-    if (detectionString === getValues(slice, fieldTypes.ASCII, detectionString.length, offset)) {
-      const valuesString = getValues(slice, fieldTypes.ASCII, heuristicAreaSize, offset);
-      const firstLine = valuesString.split('\n')[0];
-      const metadataSize = Number(firstLine.split('=')[1].split(' ')[0]) + firstLine.length;
-      if (metadataSize > heuristicAreaSize) {
-        slice = await this.getSlice(offset, metadataSize);
-      }
-      const fullString = getValues(slice, fieldTypes.ASCII, metadataSize, offset);
-      this.ghostValues = {};
-      fullString
-        .split('\n')
-        .filter(line => line.length > 0)
-        .map(line => line.split('='))
-        .forEach(([key, value]) => {
-          this.ghostValues[key] = value;
-        });
-    }
-    return this.ghostValues;
-  }
-
-  /**
-   * Parse a (Geo)TIFF file from the given source.
-   *
-   * @param {source~Source} source The source of data to parse from.
-   * @param {object} options Additional options.
-   * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is
-   *                               to be aborted
-   */
-  static async fromSource(source, options, signal) {
-    const headerData = (await source.fetch([{ offset: 0, length: 1024 }], signal))[0];
-    const dataView = new DataView64(headerData);
-
-    const BOM = dataView.getUint16(0, 0);
-    let littleEndian;
-    if (BOM === 0x4949) {
-      littleEndian = true;
-    } else if (BOM === 0x4D4D) {
-      littleEndian = false;
-    } else {
-      throw new TypeError('Invalid byte order value.');
-    }
-
-    const magicNumber = dataView.getUint16(2, littleEndian);
-    let bigTiff;
-    if (magicNumber === 42) {
-      bigTiff = false;
-    } else if (magicNumber === 43) {
-      bigTiff = true;
-      const offsetByteSize = dataView.getUint16(4, littleEndian);
-      if (offsetByteSize !== 8) {
-        throw new Error('Unsupported offset byte-size.');
-      }
-    } else {
-      throw new TypeError('Invalid magic number.');
-    }
-
-    const firstIFDOffset = bigTiff
-      ? dataView.getUint64(8, littleEndian)
-      : dataView.getUint32(4, littleEndian);
-    return new GeoTIFF(source, littleEndian, bigTiff, firstIFDOffset, options);
-  }
-
-  /**
-   * Closes the underlying file buffer
-   * N.B. After the GeoTIFF has been completely processed it needs
-   * to be closed but only if it has been constructed from a file.
-   */
-  close() {
-    if (typeof this.source.close === 'function') {
-      return this.source.close();
-    }
-    return false;
-  }
-}
-
-export { GeoTIFF };
-export default GeoTIFF;
-
-/**
- * Wrapper for GeoTIFF files that have external overviews.
- * @augments GeoTIFFBase
- */
-class MultiGeoTIFF extends GeoTIFFBase {
-  /**
-   * Construct a new MultiGeoTIFF from a main and several overview files.
-   * @param {GeoTIFF} mainFile The main GeoTIFF file.
-   * @param {GeoTIFF[]} overviewFiles An array of overview files.
-   */
-  constructor(mainFile, overviewFiles) {
-    super();
-    this.mainFile = mainFile;
-    this.overviewFiles = overviewFiles;
-    this.imageFiles = [mainFile].concat(overviewFiles);
-
-    this.fileDirectoriesPerFile = null;
-    this.fileDirectoriesPerFileParsing = null;
-    this.imageCount = null;
-  }
-
-  async parseFileDirectoriesPerFile() {
-    const requests = [this.mainFile.parseFileDirectoryAt(this.mainFile.firstIFDOffset)]
-      .concat(this.overviewFiles.map((file) => file.parseFileDirectoryAt(file.firstIFDOffset)));
-
-    this.fileDirectoriesPerFile = await Promise.all(requests);
-    return this.fileDirectoriesPerFile;
-  }
-
-  /**
-   * Get the n-th internal subfile of an image. By default, the first is returned.
-   *
-   * @param {Number} [index=0] the index of the image to return.
-   * @returns {GeoTIFFImage} the image at the given index
-   */
-  async getImage(index = 0) {
-    await this.getImageCount();
-    await this.parseFileDirectoriesPerFile();
-    let visited = 0;
-    let relativeIndex = 0;
-    for (let i = 0; i < this.imageFiles.length; i++) {
-      const imageFile = this.imageFiles[i];
-      for (let ii = 0; ii < this.imageCounts[i]; ii++) {
-        if (index === visited) {
-          const ifd = await imageFile.requestIFD(relativeIndex);
-          return new GeoTIFFImage(
-            ifd.fileDirectory, ifd.geoKeyDirectory,
-            imageFile.dataView, imageFile.littleEndian, imageFile.cache, imageFile.source,
-          );
-        }
-        visited++;
-        relativeIndex++;
-      }
-      relativeIndex = 0;
-    }
-
-    throw new RangeError('Invalid image index');
-  }
-
-  /**
-   * Returns the count of the internal subfiles.
-   *
-   * @returns {Number} the number of internal subfile images
-   */
-  async getImageCount() {
-    if (this.imageCount !== null) {
-      return this.imageCount;
-    }
-    const requests = [this.mainFile.getImageCount()]
-      .concat(this.overviewFiles.map((file) => file.getImageCount()));
-    this.imageCounts = await Promise.all(requests);
-    this.imageCount = this.imageCounts.reduce((count, ifds) => count + ifds, 0);
-    return this.imageCount;
-  }
-}
-
-export { MultiGeoTIFF };
-
-/**
- * Creates a new GeoTIFF from a remote URL.
- * @param {string} url The URL to access the image from
- * @param {object} [options] Additional options to pass to the source.
- *                           See {@link makeRemoteSource} for details.
- * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is
- *                               to be aborted
- * @returns {Promise.<GeoTIFF>} The resulting GeoTIFF file.
- */
-export async function fromUrl(url, options = {}, signal) {
-  return GeoTIFF.fromSource(makeRemoteSource(url, options), signal);
-}
-
-/**
- * Construct a new GeoTIFF from an
- * [ArrayBuffer]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer}.
- * @param {ArrayBuffer} arrayBuffer The data to read the file from.
- * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is
- *                               to be aborted
- * @returns {Promise.<GeoTIFF>} The resulting GeoTIFF file.
- */
-export async function fromArrayBuffer(arrayBuffer, signal) {
-  return GeoTIFF.fromSource(makeBufferSource(arrayBuffer), signal);
-}
-
-/**
- * Construct a GeoTIFF from a local file path. This uses the node
- * [filesystem API]{@link https://nodejs.org/api/fs.html} 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.
- * @param {string} path The file path to read from.
- * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is
- *                               to be aborted
- * @returns {Promise.<GeoTIFF>} The resulting GeoTIFF file.
- */
-export async function fromFile(path, signal) {
-  return GeoTIFF.fromSource(makeFileSource(path), signal);
-}
-
-/**
- * Construct a GeoTIFF from an HTML
- * [Blob]{@link https://developer.mozilla.org/en-US/docs/Web/API/Blob} or
- * [File]{@link https://developer.mozilla.org/en-US/docs/Web/API/File}
- * object.
- * @param {Blob|File} blob The Blob or File object to read from.
- * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is
- *                               to be aborted
- * @returns {Promise.<GeoTIFF>} The resulting GeoTIFF file.
- */
-export async function fromBlob(blob, signal) {
-  return GeoTIFF.fromSource(makeFileReaderSource(blob), signal);
-}
-
-/**
- * Construct a MultiGeoTIFF from the given URLs.
- * @param {string} mainUrl The URL for the main file.
- * @param {string[]} overviewUrls An array of URLs for the overview images.
- * @param {object} [options] Additional options to pass to the source.
- *                           See [makeRemoteSource]{@link module:source.makeRemoteSource}
- *                           for details.
- * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is
- *                               to be aborted
- * @returns {Promise.<MultiGeoTIFF>} The resulting MultiGeoTIFF file.
- */
-export async function fromUrls(mainUrl, overviewUrls = [], options = {}, signal) {
-  const mainFile = await GeoTIFF.fromSource(makeRemoteSource(mainUrl, options), signal);
-  const overviewFiles = await Promise.all(
-    overviewUrls.map((url) => GeoTIFF.fromSource(makeRemoteSource(url, options))),
-  );
-
-  return new MultiGeoTIFF(mainFile, overviewFiles);
-}
-
-/**
- * Main creating function for GeoTIFF files.
- * @param {(Array)} array of pixel values
- * @returns {metadata} metadata
- */
-export async function writeArrayBuffer(values, metadata) {
-  return writeGeotiff(values, metadata);
-}
-
-export { Pool };
-
-
-
- - - - -
- - - -
- - - - - - - diff --git a/docs/geotiffimage.js.html b/docs/geotiffimage.js.html deleted file mode 100644 index e6e04133..00000000 --- a/docs/geotiffimage.js.html +++ /dev/null @@ -1,943 +0,0 @@ - - - - - JSDoc: Source: geotiffimage.js - - - - - - - - - - -
- -

Source: geotiffimage.js

- - - - - - -
-
-
/* eslint max-len: ["error", { "code": 120 }] */
-
-import { getFloat16 } from '@petamoriken/float16';
-import txml from 'txml';
-
-import { photometricInterpretations, ExtraSamplesValues } from './globals';
-import { fromWhiteIsZero, fromBlackIsZero, fromPalette, fromCMYK, fromYCbCr, fromCIELab } from './rgb';
-import { getDecoder } from './compression';
-import { resample, resampleInterleaved } from './resample';
-
-function sum(array, start, end) {
-  let s = 0;
-  for (let i = start; i < end; ++i) {
-    s += array[i];
-  }
-  return s;
-}
-
-function arrayForType(format, bitsPerSample, size) {
-  switch (format) {
-    case 1: // unsigned integer data
-      if (bitsPerSample <= 8) {
-        return new Uint8Array(size);
-      } else if (bitsPerSample <= 16) {
-        return new Uint16Array(size);
-      } else if (bitsPerSample <= 32) {
-        return new Uint32Array(size);
-      }
-      break;
-    case 2: // twos complement signed integer data
-      if (bitsPerSample === 8) {
-        return new Int8Array(size);
-      } else if (bitsPerSample === 16) {
-        return new Int16Array(size);
-      } else if (bitsPerSample === 32) {
-        return new Int32Array(size);
-      }
-      break;
-    case 3: // floating point data
-      switch (bitsPerSample) {
-        case 16:
-        case 32:
-          return new Float32Array(size);
-        case 64:
-          return new Float64Array(size);
-        default:
-          break;
-      }
-      break;
-    default:
-      break;
-  }
-  throw Error('Unsupported data format/bitsPerSample');
-}
-
-function needsNormalization(format, bitsPerSample) {
-  if ((format === 1 || format === 2) && bitsPerSample <= 32 && bitsPerSample % 8 === 0) {
-    return false;
-  } else if (format === 3 && (bitsPerSample === 16 || bitsPerSample === 32 || bitsPerSample === 64)) {
-    return false;
-  }
-  return true;
-}
-
-function normalizeArray(inBuffer, format, planarConfiguration, samplesPerPixel, bitsPerSample, tileWidth, tileHeight) {
-  // const inByteArray = new Uint8Array(inBuffer);
-  const view = new DataView(inBuffer);
-  const outSize = planarConfiguration === 2
-    ? tileHeight * tileWidth
-    : tileHeight * tileWidth * samplesPerPixel;
-  const samplesToTransfer = planarConfiguration === 2
-    ? 1 : samplesPerPixel;
-  const outArray = arrayForType(format, bitsPerSample, outSize);
-  // let pixel = 0;
-
-  const bitMask = parseInt('1'.repeat(bitsPerSample), 2);
-
-  if (format === 1) { // unsigned integer
-    // translation of https://github.com/OSGeo/gdal/blob/master/gdal/frmts/gtiff/geotiff.cpp#L7337
-    let pixelBitSkip;
-    // let sampleBitOffset = 0;
-    if (planarConfiguration === 1) {
-      pixelBitSkip = samplesPerPixel * bitsPerSample;
-      // sampleBitOffset = (samplesPerPixel - 1) * bitsPerSample;
-    } else {
-      pixelBitSkip = bitsPerSample;
-    }
-
-    // Bits per line rounds up to next byte boundary.
-    let bitsPerLine = tileWidth * pixelBitSkip;
-    if ((bitsPerLine & 7) !== 0) {
-      bitsPerLine = (bitsPerLine + 7) & (~7);
-    }
-
-    for (let y = 0; y < tileHeight; ++y) {
-      const lineBitOffset = y * bitsPerLine;
-      for (let x = 0; x < tileWidth; ++x) {
-        const pixelBitOffset = lineBitOffset + (x * samplesToTransfer * bitsPerSample);
-        for (let i = 0; i < samplesToTransfer; ++i) {
-          const bitOffset = pixelBitOffset + (i * bitsPerSample);
-          const outIndex = (((y * tileWidth) + x) * samplesToTransfer) + i;
-
-          const byteOffset = Math.floor(bitOffset / 8);
-          const innerBitOffset = bitOffset % 8;
-          if (innerBitOffset + bitsPerSample <= 8) {
-            outArray[outIndex] = (view.getUint8(byteOffset) >> (8 - bitsPerSample) - innerBitOffset) & bitMask;
-          } else if (innerBitOffset + bitsPerSample <= 16) {
-            outArray[outIndex] = (view.getUint16(byteOffset) >> (16 - bitsPerSample) - innerBitOffset) & bitMask;
-          } else if (innerBitOffset + bitsPerSample <= 24) {
-            const raw = (view.getUint16(byteOffset) << 8) | (view.getUint8(byteOffset + 2));
-            outArray[outIndex] = (raw >> (24 - bitsPerSample) - innerBitOffset) & bitMask;
-          } else {
-            outArray[outIndex] = (view.getUint32(byteOffset) >> (32 - bitsPerSample) - innerBitOffset) & bitMask;
-          }
-
-
-          // let outWord = 0;
-          // for (let bit = 0; bit < bitsPerSample; ++bit) {
-          //   if (inByteArray[bitOffset >> 3]
-          //     & (0x80 >> (bitOffset & 7))) {
-          //     outWord |= (1 << (bitsPerSample - 1 - bit));
-          //   }
-          //   ++bitOffset;
-          // }
-
-          // outArray[outIndex] = outWord;
-          // outArray[pixel] = outWord;
-          // pixel += 1;
-        }
-        // bitOffset = bitOffset + pixelBitSkip - bitsPerSample;
-      }
-    }
-  } else if (format === 3) { // floating point
-    // Float16 is handled elsewhere
-    // normalize 16/24 bit floats to 32 bit floats in the array
-    // console.time();
-    // if (bitsPerSample === 16) {
-    //   for (let byte = 0, outIndex = 0; byte < inBuffer.byteLength; byte += 2, ++outIndex) {
-    //     outArray[outIndex] = getFloat16(view, byte);
-    //   }
-    // }
-    // console.timeEnd()
-  }
-
-  return outArray.buffer;
-}
-
-/**
- * GeoTIFF sub-file image.
- */
-class GeoTIFFImage {
-  /**
-   * @constructor
-   * @param {Object} fileDirectory The parsed file directory
-   * @param {Object} geoKeys The parsed geo-keys
-   * @param {DataView} dataView The DataView for the underlying file.
-   * @param {Boolean} littleEndian Whether the file is encoded in little or big endian
-   * @param {Boolean} cache Whether or not decoded tiles shall be cached
-   * @param {Source} source The datasource to read from
-   */
-  constructor(fileDirectory, geoKeys, dataView, littleEndian, cache, source) {
-    this.fileDirectory = fileDirectory;
-    this.geoKeys = geoKeys;
-    this.dataView = dataView;
-    this.littleEndian = littleEndian;
-    this.tiles = cache ? {} : null;
-    this.isTiled = !fileDirectory.StripOffsets;
-    const planarConfiguration = fileDirectory.PlanarConfiguration;
-    this.planarConfiguration = (typeof planarConfiguration === 'undefined') ? 1 : planarConfiguration;
-    if (this.planarConfiguration !== 1 && this.planarConfiguration !== 2) {
-      throw new Error('Invalid planar configuration.');
-    }
-
-    this.source = source;
-  }
-
-  /**
-   * Returns the associated parsed file directory.
-   * @returns {Object} the parsed file directory
-   */
-  getFileDirectory() {
-    return this.fileDirectory;
-  }
-
-  /**
-   * Returns the associated parsed geo keys.
-   * @returns {Object} the parsed geo keys
-   */
-  getGeoKeys() {
-    return this.geoKeys;
-  }
-
-  /**
-   * Returns the width of the image.
-   * @returns {Number} the width of the image
-   */
-  getWidth() {
-    return this.fileDirectory.ImageWidth;
-  }
-
-  /**
-   * Returns the height of the image.
-   * @returns {Number} the height of the image
-   */
-  getHeight() {
-    return this.fileDirectory.ImageLength;
-  }
-
-  /**
-   * Returns the number of samples per pixel.
-   * @returns {Number} the number of samples per pixel
-   */
-  getSamplesPerPixel() {
-    return typeof this.fileDirectory.SamplesPerPixel !== 'undefined'
-      ? this.fileDirectory.SamplesPerPixel : 1;
-  }
-
-  /**
-   * Returns the width of each tile.
-   * @returns {Number} the width of each tile
-   */
-  getTileWidth() {
-    return this.isTiled ? this.fileDirectory.TileWidth : this.getWidth();
-  }
-
-  /**
-   * Returns the height of each tile.
-   * @returns {Number} the height of each tile
-   */
-  getTileHeight() {
-    if (this.isTiled) {
-      return this.fileDirectory.TileLength;
-    }
-    if (typeof this.fileDirectory.RowsPerStrip !== 'undefined') {
-      return Math.min(this.fileDirectory.RowsPerStrip, this.getHeight());
-    }
-    return this.getHeight();
-  }
-
-  getBlockWidth() {
-    return this.getTileWidth();
-  }
-
-  getBlockHeight(y) {
-    if (this.isTiled || (y + 1) * this.getTileHeight() <= this.getHeight()) {
-      return this.getTileHeight();
-    } else {
-      return this.getHeight() - (y * this.getTileHeight());
-    }
-  }
-
-  /**
-   * Calculates the number of bytes for each pixel across all samples. Only full
-   * bytes are supported, an exception is thrown when this is not the case.
-   * @returns {Number} the bytes per pixel
-   */
-  getBytesPerPixel() {
-    let bytes = 0;
-    for (let i = 0; i < this.fileDirectory.BitsPerSample.length; ++i) {
-      bytes += this.getSampleByteSize(i);
-    }
-    return bytes;
-  }
-
-  getSampleByteSize(i) {
-    if (i >= this.fileDirectory.BitsPerSample.length) {
-      throw new RangeError(`Sample index ${i} is out of range.`);
-    }
-    return Math.ceil(this.fileDirectory.BitsPerSample[i] / 8);
-  }
-
-  getReaderForSample(sampleIndex) {
-    const format = this.fileDirectory.SampleFormat
-      ? this.fileDirectory.SampleFormat[sampleIndex] : 1;
-    const bitsPerSample = this.fileDirectory.BitsPerSample[sampleIndex];
-    switch (format) {
-      case 1: // unsigned integer data
-        if (bitsPerSample <= 8) {
-          return DataView.prototype.getUint8;
-        } else if (bitsPerSample <= 16) {
-          return DataView.prototype.getUint16;
-        } else if (bitsPerSample <= 32) {
-          return DataView.prototype.getUint32;
-        }
-        break;
-      case 2: // twos complement signed integer data
-        if (bitsPerSample <= 8) {
-          return DataView.prototype.getInt8;
-        } else if (bitsPerSample <= 16) {
-          return DataView.prototype.getInt16;
-        } else if (bitsPerSample <= 32) {
-          return DataView.prototype.getInt32;
-        }
-        break;
-      case 3:
-        switch (bitsPerSample) {
-          case 16:
-            return function (offset, littleEndian) {
-              return getFloat16(this, offset, littleEndian);
-            };
-          case 32:
-            return DataView.prototype.getFloat32;
-          case 64:
-            return DataView.prototype.getFloat64;
-          default:
-            break;
-        }
-        break;
-      default:
-        break;
-    }
-    throw Error('Unsupported data format/bitsPerSample');
-  }
-
-  getSampleFormat(sampleIndex = 0) {
-    return this.fileDirectory.SampleFormat
-      ? this.fileDirectory.SampleFormat[sampleIndex] : 1;
-  }
-
-  getBitsPerSample(sampleIndex = 0) {
-    return this.fileDirectory.BitsPerSample[sampleIndex];
-  }
-
-  getArrayForSample(sampleIndex, size) {
-    const format = this.getSampleFormat(sampleIndex);
-    const bitsPerSample = this.getBitsPerSample(sampleIndex);
-    return arrayForType(format, bitsPerSample, size);
-  }
-
-  /**
-   * Returns the decoded strip or tile.
-   * @param {Number} x the strip or tile x-offset
-   * @param {Number} y the tile y-offset (0 for stripped images)
-   * @param {Number} sample the sample to get for separated samples
-   * @param {Pool|AbstractDecoder} poolOrDecoder the decoder or decoder pool
-   * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is
-   *                               to be aborted
-   * @returns {Promise.<ArrayBuffer>}
-   */
-  async getTileOrStrip(x, y, sample, poolOrDecoder, signal) {
-    const numTilesPerRow = Math.ceil(this.getWidth() / this.getTileWidth());
-    const numTilesPerCol = Math.ceil(this.getHeight() / this.getTileHeight());
-    let index;
-    const { tiles } = this;
-    if (this.planarConfiguration === 1) {
-      index = (y * numTilesPerRow) + x;
-    } else if (this.planarConfiguration === 2) {
-      index = (sample * numTilesPerRow * numTilesPerCol) + (y * numTilesPerRow) + x;
-    }
-
-    let offset;
-    let byteCount;
-    if (this.isTiled) {
-      offset = this.fileDirectory.TileOffsets[index];
-      byteCount = this.fileDirectory.TileByteCounts[index];
-    } else {
-      offset = this.fileDirectory.StripOffsets[index];
-      byteCount = this.fileDirectory.StripByteCounts[index];
-    }
-    const slice = (await this.source.fetch([{ offset, length: byteCount }], signal))[0];
-
-    let request;
-    if (tiles === null || !tiles[index]) {
-    // resolve each request by potentially applying array normalization
-      request = (async () => {
-        let data = await poolOrDecoder.decode(this.fileDirectory, slice);
-        const sampleFormat = this.getSampleFormat();
-        const bitsPerSample = this.getBitsPerSample();
-        if (needsNormalization(sampleFormat, bitsPerSample)) {
-          data = normalizeArray(
-            data,
-            sampleFormat,
-            this.planarConfiguration,
-            this.getSamplesPerPixel(),
-            bitsPerSample,
-            this.getTileWidth(),
-            this.getBlockHeight(y),
-          );
-        }
-        return data;
-      })();
-
-      // set the cache
-      if (tiles !== null) {
-        tiles[index] = request;
-      }
-    } else {
-      // get from the cache
-      request = tiles[index];
-    }
-
-    // cache the tile request
-    return { x, y, sample, data: await request };
-  }
-
-  /**
-   * Internal read function.
-   * @private
-   * @param {Array} imageWindow The image window in pixel coordinates
-   * @param {Array} samples The selected samples (0-based indices)
-   * @param {TypedArray[]|TypedArray} valueArrays The array(s) to write into
-   * @param {Boolean} interleave Whether or not to write in an interleaved manner
-   * @param {Pool|AbstractDecoder} poolOrDecoder the decoder or decoder pool
-   * @param {number} width the width of window to be read into
-   * @param {number} height the height of window to be read into
-   * @param {number} resampleMethod the resampling method to be used when interpolating
-   * @param {AbortSignal} [signal] An AbortSignal that may be signalled if the request is
-   *                               to be aborted
-   * @returns {Promise<TypedArray[]>|Promise<TypedArray>}
-   */
-  async _readRaster(imageWindow, samples, valueArrays, interleave, poolOrDecoder, width, height, resampleMethod, signal) {
-    const tileWidth = this.getTileWidth();
-    const tileHeight = this.getTileHeight();
-
-    const minXTile = Math.max(Math.floor(imageWindow[0] / tileWidth), 0);
-    const maxXTile = Math.min(
-      Math.ceil(imageWindow[2] / tileWidth),
-      Math.ceil(this.getWidth() / this.getTileWidth()),
-    );
-    const minYTile = Math.max(Math.floor(imageWindow[1] / tileHeight), 0);
-    const maxYTile = Math.min(
-      Math.ceil(imageWindow[3] / tileHeight),
-      Math.ceil(this.getHeight() / this.getTileHeight()),
-    );
-    const windowWidth = imageWindow[2] - imageWindow[0];
-
-    let bytesPerPixel = this.getBytesPerPixel();
-
-    const srcSampleOffsets = [];
-    const sampleReaders = [];
-    for (let i = 0; i < samples.length; ++i) {
-      if (this.planarConfiguration === 1) {
-        srcSampleOffsets.push(sum(this.fileDirectory.BitsPerSample, 0, samples[i]) / 8);
-      } else {
-        srcSampleOffsets.push(0);
-      }
-      sampleReaders.push(this.getReaderForSample(samples[i]));
-    }
-
-    const promises = [];
-    const { littleEndian } = this;
-
-    for (let yTile = minYTile; yTile < maxYTile; ++yTile) {
-      for (let xTile = minXTile; xTile < maxXTile; ++xTile) {
-        for (let sampleIndex = 0; sampleIndex < samples.length; ++sampleIndex) {
-          const si = sampleIndex;
-          const sample = samples[sampleIndex];
-          if (this.planarConfiguration === 2) {
-            bytesPerPixel = this.getSampleByteSize(sampleIndex);
-          }
-          const promise = this.getTileOrStrip(xTile, yTile, sample, poolOrDecoder, signal);
-          promises.push(promise);
-          promise.then((tile) => {
-            const buffer = tile.data;
-            const dataView = new DataView(buffer);
-            const blockHeight = this.getBlockHeight(tile.y);
-            const firstLine = tile.y * tileHeight;
-            const firstCol = tile.x * tileWidth;
-            const lastLine = firstLine + blockHeight;
-            const lastCol = (tile.x + 1) * tileWidth;
-            const reader = sampleReaders[si];
-
-            const ymax = Math.min(blockHeight, blockHeight - (lastLine - imageWindow[3]));
-            const xmax = Math.min(tileWidth, tileWidth - (lastCol - imageWindow[2]));
-
-            for (let y = Math.max(0, imageWindow[1] - firstLine); y < ymax; ++y) {
-              for (let x = Math.max(0, imageWindow[0] - firstCol); x < xmax; ++x) {
-                const pixelOffset = ((y * tileWidth) + x) * bytesPerPixel;
-                const value = reader.call(
-                  dataView, pixelOffset + srcSampleOffsets[si], littleEndian,
-                );
-                let windowCoordinate;
-                if (interleave) {
-                  windowCoordinate = ((y + firstLine - imageWindow[1]) * windowWidth * samples.length)
-                    + ((x + firstCol - imageWindow[0]) * samples.length)
-                    + si;
-                  valueArrays[windowCoordinate] = value;
-                } else {
-                  windowCoordinate = (
-                    (y + firstLine - imageWindow[1]) * windowWidth
-                  ) + x + firstCol - imageWindow[0];
-                  valueArrays[si][windowCoordinate] = value;
-                }
-              }
-            }
-          });
-        }
-      }
-    }
-    await Promise.all(promises);
-
-    if ((width && (imageWindow[2] - imageWindow[0]) !== width)
-        || (height && (imageWindow[3] - imageWindow[1]) !== height)) {
-      let resampled;
-      if (interleave) {
-        resampled = resampleInterleaved(
-          valueArrays,
-          imageWindow[2] - imageWindow[0],
-          imageWindow[3] - imageWindow[1],
-          width, height,
-          samples.length,
-          resampleMethod,
-        );
-      } else {
-        resampled = resample(
-          valueArrays,
-          imageWindow[2] - imageWindow[0],
-          imageWindow[3] - imageWindow[1],
-          width, height,
-          resampleMethod,
-        );
-      }
-      resampled.width = width;
-      resampled.height = height;
-      return resampled;
-    }
-
-    valueArrays.width = width || imageWindow[2] - imageWindow[0];
-    valueArrays.height = height || imageWindow[3] - imageWindow[1];
-
-    return valueArrays;
-  }
-
-  /**
-   * Reads raster data from the image. This function reads all selected samples
-   * into separate arrays of the correct type for that sample or into a single
-   * combined array when `interleave` is set. When provided, only a subset
-   * of the raster is read for each sample.
-   *
-   * @param {Object} [options={}] optional parameters
-   * @param {Array} [options.window=whole image] the subset to read data from.
-   * @param {Array} [options.samples=all samples] the selection of samples to read from.
-   * @param {Boolean} [options.interleave=false] whether the data shall be read
-   *                                             in one single array or separate
-   *                                             arrays.
-   * @param {Number} [options.pool=null] The optional decoder pool to use.
-   * @param {number} [options.width] The desired width of the output. When the width is
-   *                                 not the same as the images, resampling will be
-   *                                 performed.
-   * @param {number} [options.height] The desired height of the output. When the width
-   *                                  is not the same as the images, resampling will
-   *                                  be performed.
-   * @param {string} [options.resampleMethod='nearest'] The desired resampling method.
-   * @param {number|number[]} [options.fillValue] 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.
-   * @param {AbortSignal} [options.signal] An AbortSignal that may be signalled if the request is
-   *                                       to be aborted
-   * @returns {Promise.<(TypedArray|TypedArray[])>} the decoded arrays as a promise
-   */
-  async readRasters({
-    window: wnd, samples = [], interleave, pool = null,
-    width, height, resampleMethod, fillValue, signal,
-  } = {}) {
-    const imageWindow = wnd || [0, 0, this.getWidth(), this.getHeight()];
-
-    // check parameters
-    if (imageWindow[0] > imageWindow[2] || imageWindow[1] > imageWindow[3]) {
-      throw new Error('Invalid subsets');
-    }
-
-    const imageWindowWidth = imageWindow[2] - imageWindow[0];
-    const imageWindowHeight = imageWindow[3] - imageWindow[1];
-    const numPixels = imageWindowWidth * imageWindowHeight;
-    const samplesPerPixel = this.getSamplesPerPixel();
-
-    if (!samples || !samples.length) {
-      for (let i = 0; i < samplesPerPixel; ++i) {
-        samples.push(i);
-      }
-    } else {
-      for (let i = 0; i < samples.length; ++i) {
-        if (samples[i] >= samplesPerPixel) {
-          return Promise.reject(new RangeError(`Invalid sample index '${samples[i]}'.`));
-        }
-      }
-    }
-    let valueArrays;
-    if (interleave) {
-      const format = this.fileDirectory.SampleFormat
-        ? Math.max.apply(null, this.fileDirectory.SampleFormat) : 1;
-      const bitsPerSample = Math.max.apply(null, this.fileDirectory.BitsPerSample);
-      valueArrays = arrayForType(format, bitsPerSample, numPixels * samples.length);
-      if (fillValue) {
-        valueArrays.fill(fillValue);
-      }
-    } else {
-      valueArrays = [];
-      for (let i = 0; i < samples.length; ++i) {
-        const valueArray = this.getArrayForSample(samples[i], numPixels);
-        if (Array.isArray(fillValue) && i < fillValue.length) {
-          valueArray.fill(fillValue[i]);
-        } else if (fillValue && !Array.isArray(fillValue)) {
-          valueArray.fill(fillValue);
-        }
-        valueArrays.push(valueArray);
-      }
-    }
-
-    const poolOrDecoder = pool || getDecoder(this.fileDirectory);
-
-    const result = await this._readRaster(
-      imageWindow, samples, valueArrays, interleave, poolOrDecoder, width, height, resampleMethod, signal,
-    );
-    return result;
-  }
-
-  /**
-   * Reads raster data from the image as RGB. The result is always an
-   * interleaved typed array.
-   * Colorspaces other than RGB will be transformed to RGB, color maps expanded.
-   * When no other method is applicable, the first sample is used to produce a
-   * greayscale image.
-   * When provided, only a subset of the raster is read for each sample.
-   *
-   * @param {Object} [options] optional parameters
-   * @param {Array} [options.window=whole image] the subset to read data from.
-   * @param {Number} [options.pool=null] The optional decoder pool to use.
-   * @param {number} [options.width] The desired width of the output. When the width is no the
-   *                                 same as the images, resampling will be performed.
-   * @param {number} [options.height] The desired height of the output. When the width is no the
-   *                                  same as the images, resampling will be performed.
-   * @param {string} [options.resampleMethod='nearest'] The desired resampling method.
-   * @param {bool} [options.enableAlpha=false] Enable reading alpha channel if present.
-   * @param {AbortSignal} [options.signal] An AbortSignal that may be signalled if the request is
-   *                                       to be aborted
-   * @returns {Promise.<TypedArray|TypedArray[]>} the RGB array as a Promise
-   */
-  async readRGB({ window, pool = null, width, height, resampleMethod, enableAlpha = false, signal } = {}) {
-    const imageWindow = window || [0, 0, this.getWidth(), this.getHeight()];
-
-    // check parameters
-    if (imageWindow[0] > imageWindow[2] || imageWindow[1] > imageWindow[3]) {
-      throw new Error('Invalid subsets');
-    }
-
-    const pi = this.fileDirectory.PhotometricInterpretation;
-
-    if (pi === photometricInterpretations.RGB) {
-      let s = [0, 1, 2];
-      if ((!(this.fileDirectory.ExtraSamples === ExtraSamplesValues.Unspecified)) && enableAlpha) {
-        s = [];
-        for (let i = 0; i < this.fileDirectory.BitsPerSample.length; i += 1) {
-          s.push(i);
-        }
-      }
-      return this.readRasters({
-        window,
-        interleave: true,
-        samples: s,
-        pool,
-        width,
-        height,
-        resampleMethod,
-        signal,
-      });
-    }
-
-    let samples;
-    switch (pi) {
-      case photometricInterpretations.WhiteIsZero:
-      case photometricInterpretations.BlackIsZero:
-      case photometricInterpretations.Palette:
-        samples = [0];
-        break;
-      case photometricInterpretations.CMYK:
-        samples = [0, 1, 2, 3];
-        break;
-      case photometricInterpretations.YCbCr:
-      case photometricInterpretations.CIELab:
-        samples = [0, 1, 2];
-        break;
-      default:
-        throw new Error('Invalid or unsupported photometric interpretation.');
-    }
-
-    const subOptions = {
-      window: imageWindow,
-      interleave: true,
-      samples,
-      pool,
-      width,
-      height,
-      resampleMethod,
-      signal,
-    };
-    const { fileDirectory } = this;
-    const raster = await this.readRasters(subOptions);
-
-    const max = 2 ** this.fileDirectory.BitsPerSample[0];
-    let data;
-    switch (pi) {
-      case photometricInterpretations.WhiteIsZero:
-        data = fromWhiteIsZero(raster, max);
-        break;
-      case photometricInterpretations.BlackIsZero:
-        data = fromBlackIsZero(raster, max);
-        break;
-      case photometricInterpretations.Palette:
-        data = fromPalette(raster, fileDirectory.ColorMap);
-        break;
-      case photometricInterpretations.CMYK:
-        data = fromCMYK(raster);
-        break;
-      case photometricInterpretations.YCbCr:
-        data = fromYCbCr(raster);
-        break;
-      case photometricInterpretations.CIELab:
-        data = fromCIELab(raster);
-        break;
-      default:
-        throw new Error('Unsupported photometric interpretation.');
-    }
-    data.width = raster.width;
-    data.height = raster.height;
-    return data;
-  }
-
-  /**
-   * Returns an array of tiepoints.
-   * @returns {Object[]}
-   */
-  getTiePoints() {
-    if (!this.fileDirectory.ModelTiepoint) {
-      return [];
-    }
-
-    const tiePoints = [];
-    for (let i = 0; i < this.fileDirectory.ModelTiepoint.length; i += 6) {
-      tiePoints.push({
-        i: this.fileDirectory.ModelTiepoint[i],
-        j: this.fileDirectory.ModelTiepoint[i + 1],
-        k: this.fileDirectory.ModelTiepoint[i + 2],
-        x: this.fileDirectory.ModelTiepoint[i + 3],
-        y: this.fileDirectory.ModelTiepoint[i + 4],
-        z: this.fileDirectory.ModelTiepoint[i + 5],
-      });
-    }
-    return tiePoints;
-  }
-
-  /**
-   * Returns the parsed GDAL metadata items.
-   *
-   * If sample is passed to null, dataset-level metadata will be returned.
-   * Otherwise only metadata specific to the provided sample will be returned.
-   *
-   * @param {Number} [sample=null] The sample index.
-   * @returns {Object}
-   */
-  getGDALMetadata(sample = null) {
-    const metadata = {};
-    if (!this.fileDirectory.GDAL_METADATA) {
-      return null;
-    }
-    const string = this.fileDirectory.GDAL_METADATA;
-    const xmlDom = txml(string.substring(0, string.length - 1));
-
-    if (!xmlDom[0].tagName) {
-      throw new Error('Failed to parse GDAL metadata XML.');
-    }
-
-    const root = xmlDom[0];
-    if (root.tagName !== 'GDALMetadata') {
-      throw new Error('Unexpected GDAL metadata XML tag.');
-    }
-
-    let items = root.children
-      .filter((child) => child.tagName === 'Item');
-
-    if (sample !== null) {
-      items = items.filter((item) => Number(item.attributes.sample) === sample);
-    }
-
-    for (let i = 0; i < items.length; ++i) {
-      const item = items[i];
-      metadata[item.attributes.name] = item.children[0];
-    }
-    return metadata;
-  }
-
-  /**
-   * Returns the GDAL nodata value
-   * @returns {Number} or null
-   */
-  getGDALNoData() {
-    if (!this.fileDirectory.GDAL_NODATA) {
-      return null;
-    }
-    const string = this.fileDirectory.GDAL_NODATA;
-    return Number(string.substring(0, string.length - 1));
-  }
-
-  /**
-   * Returns the image origin as a XYZ-vector. When the image has no affine
-   * transformation, then an exception is thrown.
-   * @returns {Array} The origin as a vector
-   */
-  getOrigin() {
-    const tiePoints = this.fileDirectory.ModelTiepoint;
-    const modelTransformation = this.fileDirectory.ModelTransformation;
-    if (tiePoints && tiePoints.length === 6) {
-      return [
-        tiePoints[3],
-        tiePoints[4],
-        tiePoints[5],
-      ];
-    }
-    if (modelTransformation) {
-      return [
-        modelTransformation[3],
-        modelTransformation[7],
-        modelTransformation[11],
-      ];
-    }
-    throw new Error('The image does not have an affine transformation.');
-  }
-
-  /**
-   * Returns the image resolution as a XYZ-vector. When the image has no affine
-   * transformation, then an exception is thrown.
-   * @param {GeoTIFFImage} [referenceImage=null] A reference image to calculate the resolution from
-   *                                             in cases when the current image does not have the
-   *                                             required tags on its own.
-   * @returns {Array} The resolution as a vector
-   */
-  getResolution(referenceImage = null) {
-    const modelPixelScale = this.fileDirectory.ModelPixelScale;
-    const modelTransformation = this.fileDirectory.ModelTransformation;
-
-    if (modelPixelScale) {
-      return [
-        modelPixelScale[0],
-        -modelPixelScale[1],
-        modelPixelScale[2],
-      ];
-    }
-    if (modelTransformation) {
-      return [
-        modelTransformation[0],
-        modelTransformation[5],
-        modelTransformation[10],
-      ];
-    }
-
-    if (referenceImage) {
-      const [refResX, refResY, refResZ] = referenceImage.getResolution();
-      return [
-        refResX * referenceImage.getWidth() / this.getWidth(),
-        refResY * referenceImage.getHeight() / this.getHeight(),
-        refResZ * referenceImage.getWidth() / this.getWidth(),
-      ];
-    }
-
-    throw new Error('The image does not have an affine transformation.');
-  }
-
-  /**
-   * Returns whether or not the pixels of the image depict an area (or point).
-   * @returns {Boolean} Whether the pixels are a point
-   */
-  pixelIsArea() {
-    return this.geoKeys.GTRasterTypeGeoKey === 1;
-  }
-
-  /**
-   * Returns the image bounding box as an array of 4 values: min-x, min-y,
-   * max-x and max-y. When the image has no affine transformation, then an
-   * exception is thrown.
-   * @returns {Array} The bounding box
-   */
-  getBoundingBox() {
-    const origin = this.getOrigin();
-    const resolution = this.getResolution();
-
-    const x1 = origin[0];
-    const y1 = origin[1];
-
-    const x2 = x1 + (resolution[0] * this.getWidth());
-    const y2 = y1 + (resolution[1] * this.getHeight());
-
-    return [
-      Math.min(x1, x2),
-      Math.min(y1, y2),
-      Math.max(x1, x2),
-      Math.max(y1, y2),
-    ];
-  }
-}
-
-export default GeoTIFFImage;
-
-
-
- - - - -
- - - -
- - - - - - - diff --git a/docs/global.html b/docs/global.html deleted file mode 100644 index 8d91ffed..00000000 --- a/docs/global.html +++ /dev/null @@ -1,2774 +0,0 @@ - - - - - JSDoc: Global - - - - - - - - - - -
- -

Global

- - - - - - -
- -
- -

- - -
- -
-
- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

fromArrayBuffer(arrayBuffer, signalopt) → {Promise.<GeoTIFF>}

- - - - - - -
-

Construct a new GeoTIFF from an -ArrayBuffer.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
file - - -Blob - - - -

The file or blob to read from.

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

The constructed source

-
- - - - - - - - - - - - - - - -

makeRemoteSource(url, options)

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
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:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
text - - -String - - - -

the text to parse the headers from

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

the parsed headers with lowercase keys

-
- - - -
-
- Type -
-
- -Object - - -
-
- - - - - - - - - - - - - -

setLogger(logger)

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
logger - - -object - - - -

the new logger. e.g console

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -

writeArrayBuffer(array) → {metadata}

- - - - - - -
-

Main creating function for GeoTIFF files.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
array - - -Array - - - -

of pixel values

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

metadata

-
- - - -
-
- Type -
-
- -metadata - - -
-
- - - - - - - - - - - -

Type Definitions

- - - -

CCITTFaxDecoderSource

- - - - - - -
Type:
-
    -
  • - -Object - - -
  • -
- - - - - -
Properties:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
next - - -function - - - -

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

- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - -

Slice

- - - - - - - - - - -
Properties:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
offset - - -number - - - -
length - - -number - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 7704b57e..00000000 --- a/docs/index.html +++ /dev/null @@ -1,456 +0,0 @@ - - - - - JSDoc: Home - - - - - - - - - - -
- -

Home

- - - - - - - - -

- - - - - - - - - - - - - - - -
-

geotiff.js

-

Build Status npm version Gitter chat

-

Read (geospatial) metadata and raw array data from a wide variety of different -(Geo)TIFF files types.

-

Features

-

Currently available functionality:

-
    -
  • Parsing TIFFs from various sources: -
      -
    • remote (via fetch or XHR)
    • -
    • from a local ArrayBuffer
    • -
    • from the filesystem (on Browsers using the FileReader and on node using the filesystem functions)
    • -
    -
  • -
  • Parsing the headers of all possible TIFF files
  • -
  • Rudimentary extraction of geospatial metadata
  • -
  • Reading raster data from: -
      -
    • stripped images
    • -
    • tiled images
    • -
    • band interleaved images
    • -
    • pixel interleaved images
    • -
    -
  • -
  • Supported data-types: -
      -
    • (U)Int8/16/32
    • -
    • UInt1-31 (with some drawbacks)
    • -
    • Float16/32/64
    • -
    -
  • -
  • Enabled compressions: -
      -
    • no compression
    • -
    • Packbits
    • -
    • LZW
    • -
    • Deflate (with floating point or horizontal predictor support)
    • -
    • JPEG
    • -
    -
  • -
  • Automatic selection of overview level to read from
  • -
  • Subsetting via an image window or bounding box and selected bands
  • -
  • Reading of samples into separate arrays or a single pixel-interleaved array
  • -
  • Configurable tile/strip cache
  • -
  • Configurable Pool of workers to increase decoding efficiency
  • -
  • Utility functions for geospatial parameters (Bounding Box, Origin, Resolution)
  • -
  • Limited bigTIFF support
  • -
  • Automated testing via PhantomJS
  • -
-

Further documentation can be found here.

-

Example Usage

- -

3D slice view

- -

contour

-

Setup

-

To setup the repository do the following steps:

-
# clone repo
-git clone https://github.com/constantinius/geotiff.js.git
-cd geotiff.js/
-
-# install development dependencies
-npm install
-
-

Testing and Building

-

In order to run the tests you first have to set up the test data. This requires -the GDAL and ImageMagick tools. -Installation of these tools varies according to the operating system, the -following listing shows the installation on Ubuntu (using the ubuntugis-unstable -repository):

-
sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
-sudo apt-get update
-sudo apt-get install -y gdal-bin imagemagick
-
-

To install GDAL and ImageMagick on MacOS X, please use Homebrew. The setup script also needs wget on MacOS X

-
brew install wget gdal imagemagick
-
-

When GDAL and ImageMagick is installed, the test data setup script can be run:

-
cd test/data
-sh setup_data.sh
-cd -
-
-

To test the library (using PhantomJS, karma, mocha and chai) do the following:

-
npm test
-
-

To do some in-browser testing do:

-
npm run dev
-
-

and navigate to http://localhost:8090/index.html

-

To build the library do:

-
npm run build
-
-

The output is written to dist-browser/main.js and dist-node/main.js.

-

Install

-

You can install geotiff.js using npm:

-
npm install geotiff
-
-

or you can use the prebuilt version with a CDN:

-
<script src="https://cdn.jsdelivr.net/npm/geotiff"></script>
-
-

Note: Currently the CDN installation is not compatible with GeoTIFF workers pool GeoTIFF.Pool.

-

Usage

-

geotiff.js works with both require, import and the global variable GeoTIFF:

-
const GeoTIFF = require('geotiff');
-const { fromUrl, fromUrls, fromArrayBuffer, fromBlob } = GeoTIFF;
-
-// or
-import GeoTIFF, { fromUrl, fromUrls, fromArrayBuffer, fromBlob } from 'geotiff';
-
-

or:

-
<script async src="https://cdn.jsdelivr.net/npm/geotiff"></script>
-<script>
-  console.log(GeoTIFF);
-  // Note: GeoTIFF.Pool will not work
-</script>
-
-

To parse a GeoTIFF, first a data source is required. To help with the development, -there are shortcuts available. The following creates a source that reads from a -remote GeoTIFF referenced by a URL:

-
fromUrl(someUrl)
-  .then(tiff => { /* ... */});
-
-// or when using async/await
-(async function() {
-  const tiff = await fromUrl(someUrl);
-  // ...
-})()
-
-

Note: the interactions with geotiff.js objects are oftentimes asynchronous. For -the sake of brevity we will only show the async/await syntax and not the -Promise based one in the following examples.

-

Accessing remote images is just one way to open TIFF images with geotiff.js. Other -options are reading from a local ArrayBuffer:

-
// using local ArrayBuffer
-const response = await fetch(someUrl);
-const arrayBuffer = await response.arrayBuffer();
-const tiff = await fromArrayBuffer(arrayBuffer);
-
-

or a Blob/File:

-
<input type="file" id="file">
-<script>
-  const input = document.getElementById('file'):
-  input.onchange = async function() {
-    const tiff = await fromBlob(input.files[0]);
-  }
-</script>
-
-

Now that we have opened the TIFF file, we can inspect it. The TIFF is structured -in a small header and a list of one or more images (Image File Directory, IFD to -use the TIFF nomenclature). To get one image by index the getImage() function -must be used. This is again an asynchronous operation, as the IFDs are loaded -lazily:

-
const image = await tiff.getImage(); // by default, the first image is read.
-
-

Now that we have obtained a GeoTIFFImage object we can inspect its metadata -(like size, tiling, number of samples, geographical information, etc.). All -the metadata is parsed once the IFD is first parsed, thus the access to that -is synchronous:

-
const width = image.getWidth();
-const height = image.getHeight();
-const tileWidth = image.getTileWidth();
-const tileHeight = image.getTileHeight();
-const samplesPerPixel = image.getSamplesPerPixel();
-
-// when we are actually dealing with geo-data the following methods return
-// meaningful results:
-const origin = image.getOrigin();
-const resolution = image.getResolution();
-const bbox = image.getBoundingBox();
-
-

The actual raster data is not fetched and parsed automatically. This is because -it is usually much more spacious and the decoding of the pixels can be time -consuming due to the necessity of decompression.

-

To read a whole image into one big array of arrays the following method call can be used:

-
const data = await image.readRasters();
-
-

For convenience the result always has a width and height attribute:

-
const data = await image.readRasters();
-const { width, height } = data;
-
-

By default, the raster is split to a separate array for each component. For an RGB image -for example, we'd get three arrays, one for red, green and blue.

-
const [red, green, blue] = await image.readRasters();
-
-

If we want instead all the bands interleaved in one big array, we have to pass the -interleave: true option:

-
const [r0, g0, b0, r1, g1, b1, ...] = await image.readRasters({ interleave: true });
-
-

If we are only interested in a specific region of the image, the window option can be -used to limit reading in that bounding box. Note: the bounding box is in 'image coordinates' -not geographical ones:

-
const left = 50;
-const top = 10;
-const right = 150;
-const bottom = 60;
-
-const data = await image.readRasters({ window: [left, top, right, bottom] });
-
-

This image window can go beyond the image bounds. In that case it might be usefull to supply -a fillValue: value option (can also be an array, one value for each sample).

-

It is also possible to just read specific samples for each pixel. For example, we can only -read the red component from an RGB image:

-
const [red] = await image.readRasters({ samples: [0] });
-
-

When you want your output in a specific size, you can use the width and height options. -This defaults of course to the size of your supplied window or the image size if no -window was supplied.

-

As the data now needs to be resampled, a resampleMethod can be specified. This defaults to -the nearest neighbour method, but also the 'bilinear' method is supported:

-
const data = await image.readRasters({ width: 40, height: 40, resampleMethod: 'bilinear' });
-
-

Using decoder pools to improve parsing performance

-

Decoding compressed images can be a time consuming process. To minimize this -geotiff.js provides the Pool mechanism which uses WebWorkers to split the amount -of work on multiple 'threads'.

-
const pool = new GeoTIFF.Pool();
-const data = await image.readRasters({ pool });
-
-

It is possible to provide a pool size (i.e: number of workers), by default the number -of available processors is used.

-

Because of the way WebWorker work (pun intended), there is a considerable overhead -involved when using the Pool, as all the data must be copied and cannot be simply be -shared. But the benefits are two-fold. First: for larger image reads the overall time -is still likely to be reduced and second: the main thread is relieved which helps to -uphold responsiveness.

-

If you want to use the Worker Pool in a project built with webpack (ex: VueJS or React) you have to install threads-plugin and add the plugin to your webpack.config.js:

-
npm install -D threads-plugin
-
-
const ThreadsPlugin = require('threads-plugin')
-
-module.exports = {
-  // ...
-  plugins: [
-    new ThreadsPlugin()
-  ]
-}
-
-

Dealing with visual data

-

The TIFF specification provides various ways to encode visual data. In the -specification this is called photometric interpretation. The simplest case we -already dealt with is the RGB one. Others are grayscale, paletted images, CMYK, -YCbCr, and CIE Lab.

-

geotiff.js provides a method to automatically convert these images to RGB: -readRGB(). This method is very similar to the readRasters method with -distinction that the interleave option is now always true and the -samples are automatically chosen.

-
const rgb = await image.readRGB({
-  // options...
-});
-
-

Automatic image selection (experimental)

-

When dealing with images that have internal (or even external, see the next section) -overviews, GeoTIFF objects provide a separate readRasters method. This method -works very similar to the method on the GeoTIFFImage objects with the same name. -By default, it uses the larges image available (highest resolution), but when either -width, height, resX, or resY are specified, then the best fitting image will -be used for reading.

-

Additionally, it allows the bbox instead of the window parameter. This works -similarly, but uses geographic coordinates instead of pixel ones.

-
const data = await tiff.readRasters({
-  bbox: [10.34, 57.28, 13.34, 60.23],
-  resX: 0.1,
-  resY: 0.1
-});
-
-

External overviews

-

Especially for certain kinds of high resolution images it is not uncommon to separate -the highest resolution from the lower resolution overviews (usually using the .ovr -extension). With geotiff.js it is possible to use files of this setup, just as you -would use single-file images by taking advantage of the MultiGeoTIFF objects. They -behave exactly the same as the before mentioned GeoTIFF objects: you can select -images by index or read data using readRasters. Toget such a file use the fromUrls -factory function:

-
const multiTiff = await fromUrls(
-  'LC08_L1TP_189027_20170403_20170414_01_T1_B3.TIF',
-  ['LC08_L1TP_189027_20170403_20170414_01_T1_B3.TIF.ovr']
-);
-
-

AbortController Support

-

Geotiff.js supports the use of AbortControllers. Calls to getRasters, readRGB and getTileOrStrip will throw an Error with name AbortSignal similar to the browser's fetch behavior.

-
const abortController = new AbortController();
-const { signal } = abortController;
-abortController.abort();
-try {
-  const data = await tiff.readRasters({ signal });
-} catch(e) {
-  if (err.name === 'AbortError') {
-    // do stuff
-  }
-}
-
-

Writing GeoTIFFs (Beta Version)

-

You can create a binary representation of a GeoTIFF using writeArrayBuffer. -This function returns an ArrayBuffer which you can then save as a .tif file. -:warning: writeArrayBuffer currently writes the values uncompressed

-
import GeoTIFF, { writeArrayBuffer } from 'geotiff';
-
-const values = [1, 2, 3, 4, 5, 6, 7, 8, 9];
-const metadata = {
-  height: 3,
-  width: 3
-};
-const arrayBuffer = await writeArrayBuffer(values, metadata);
-
-

You can also customize the metadata using names found in the TIFF Spec and GeoTIFF spec.

-
import { writeArrayBuffer } from 'geotiff';
-
-const values = [1, 2, 3, 4, 5, 6, 7, 8, 9];
-const metadata = {
-  height: 3,
-  ModelPixelScale: [0.031355, 0.031355, 0],
-  ModelTiepoint: [0, 0, 0, 11.331755000000001, 46.268645, 0],
-  width: 3
-};
-const arrayBuffer = await writeArrayBuffer(values, metadata);
-
-

What to do with the data?

-

There is a nice HTML 5/WebGL based rendering library called -plotty, that allows for some really nice -on the fly rendering of the data contained in a GeoTIFF.

-
<canvas id="plot"></canvas>
-<script>
-  // ...
-
-  (async function() {
-    const tiff = await fromUrl(url);
-    const image = await tiff.getImage();
-    const data = await image.readRasters();
-
-    const canvas = document.getElementById("plot");
-    const plot = new plotty.plot({
-      canvas,
-      data: data[0],
-      width: image.getWidth(),
-      height: image.getHeight(),
-      domain: [0, 256],
-      colorScale: "viridis"
-    });
-    plot.render();
-  })();
-</script>
-
-

BigTIFF support

-

geotiff.js has a limited support for files in the BigTIFF format. The limitations -originate in the capabilities of current JavaScript implementations regarding -64 bit integer parsers and structures: there are no functions to read 64 bit -integers from a stream and no such typed arrays. As BigTIFF relies on 64 bit -offsets and also allows tag values of those types. In order to still provide -a reasonable support, the following is implemented:

-
    -
  • 64 bit integers are read as two 32 bit integers and then combined. As -numbers in JavaScript are typically implemented as 64 bit floats, there -might be inaccuracies for very large values.
  • -
  • For 64 bit integer arrays, the default Array type is used. This might -cause problems for some compression algorithms if those arrays are used for -pixel values.
  • -
-

n-bit Support

-

geotiff.js has some n-bit support which means that it supports unsigned integer -data reading with each element using a non-multiple of 8 bit depth. This only -works with band interleaved images (see -this related issue).

-

Planned stuff:

-
    -
  • Better support of geospatial parameters: -
      -
    • Parsing of EPSG identifiers
    • -
    • WKT representation
    • -
    -
  • -
-

Known Issues

-

The open issues can be found on GitHub.

-

Contribution

-

If you have an idea, found a bug or have a remark, please open a ticket, we will -look into it ASAP.

-

Pull requests are welcome as well!

-

Community Packages

-

A list of community packages can be found in COMMUNITY.md

-

Acknowledgements

-

This library was inspired by -GeotiffParser. It provided a -great starting point, but lacked the capabilities to read the raw raster data -which is the aim of geotiff.js.

-
- - - - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-pool-Pool.html b/docs/module-pool-Pool.html deleted file mode 100644 index 29d246f3..00000000 --- a/docs/module-pool-Pool.html +++ /dev/null @@ -1,410 +0,0 @@ - - - - - JSDoc: Class: Pool - - - - - - - - - - -
- -

Class: Pool

- - - - - - -
- -
- -

- pool~Pool(size, worker)

- -

Pool for workers to decode chunks of the images.

- - -
- -
-
- - - - -

Constructor

- - - -

new Pool(size, worker)

- - - - - - - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
size - - -Number - - - -

The size of the pool. Defaults to the number of CPUs -available. When this parameter is null or 0, then the -decoding will be done in the main thread.

worker - - -Worker - - - -

The decoder worker, loaded and initialised. Enables -loading the worker using worker-loader(or others) externally -when using this library as a webpack dependency.

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

(async) decode(buffer) → {Promise.<ArrayBuffer>}

- - - - - - -
-

Decode the given block of bytes with the set compression method.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
buffer - - -ArrayBuffer - - - -

the array buffer of bytes to decode.

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

the decoded result as a Promise

-
- - - -
-
- Type -
-
- -Promise.<ArrayBuffer> - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-pool.html b/docs/module-pool.html deleted file mode 100644 index a26a4ce4..00000000 --- a/docs/module-pool.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - JSDoc: Module: pool - - - - - - - - - - -
- -

Module: pool

- - - - - - -
- -
- - - -
- -
-
- - - - - -
- - - - - - -

Classes

- -
-
Pool
-
-
- - - - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/module-resample.html b/docs/module-resample.html deleted file mode 100644 index 715e0cc3..00000000 --- a/docs/module-resample.html +++ /dev/null @@ -1,1885 +0,0 @@ - - - - - JSDoc: Module: resample - - - - - - - - - - -
- -

Module: resample

- - - - - - -
- -
- - - -
- -
-
- - - - - -
- - - - - - - - - - - - - - - - -

Methods

- - - - - - - -

(static) resample(valueArrays, inWidth, inHeight, outWidth, outHeight, methodopt) → {Array.<TypedArray>}

- - - - - - -
-

Resample the input arrays using the selected resampling method.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
valueArrays - - -Array.<TypedArray> - - - - - - - - - - - -

The input arrays to resample

inWidth - - -number - - - - - - - - - - - -

The width of the input rasters

inHeight - - -number - - - - - - - - - - - -

The height of the input rasters

outWidth - - -number - - - - - - - - - - - -

The desired width of the output rasters

outHeight - - -number - - - - - - - - - - - -

The desired height of the output rasters

method - - -string - - - - - - <optional>
- - - - - -
- - 'nearest' - -

The desired resampling method

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

The resampled rasters

-
- - - -
-
- Type -
-
- -Array.<TypedArray> - - -
-
- - - - - - - - - - - - - -

(static) resampleBilinear(valueArrays, inWidth, inHeight, outWidth, outHeight) → {Array.<TypedArray>}

- - - - - - -
-

Resample the input arrays using bilinear interpolation.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
valueArrays - - -Array.<TypedArray> - - - -

The input arrays to resample

inWidth - - -number - - - -

The width of the input rasters

inHeight - - -number - - - -

The height of the input rasters

outWidth - - -number - - - -

The desired width of the output rasters

outHeight - - -number - - - -

The desired height of the output rasters

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

The resampled rasters

-
- - - -
-
- Type -
-
- -Array.<TypedArray> - - -
-
- - - - - - - - - - - - - -

(static) resampleBilinearInterleaved(valueArrays, inWidth, inHeight, outWidth, outHeight, samples) → {TypedArray}

- - - - - - -
-

Resample the pixel interleaved input array using bilinear interpolation.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
valueArrays - - -TypedArray - - - -

The input arrays to resample

inWidth - - -number - - - -

The width of the input rasters

inHeight - - -number - - - -

The height of the input rasters

outWidth - - -number - - - -

The desired width of the output rasters

outHeight - - -number - - - -

The desired height of the output rasters

samples - - -number - - - -

The number of samples per pixel for pixel -interleaved data

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

The resampled raster

-
- - - -
-
- Type -
-
- -TypedArray - - -
-
- - - - - - - - - - - - - -

(static) resampleInterleaved(valueArray, inWidth, inHeight, outWidth, outHeight, samples, methodopt) → {TypedArray}

- - - - - - -
-

Resample the pixel interleaved input array using the selected resampling method.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeAttributesDefaultDescription
valueArray - - -TypedArray - - - - - - - - - - - -

The input array to resample

inWidth - - -number - - - - - - - - - - - -

The width of the input rasters

inHeight - - -number - - - - - - - - - - - -

The height of the input rasters

outWidth - - -number - - - - - - - - - - - -

The desired width of the output rasters

outHeight - - -number - - - - - - - - - - - -

The desired height of the output rasters

samples - - -number - - - - - - - - - - - -

The number of samples per pixel for pixel -interleaved data

method - - -string - - - - - - <optional>
- - - - - -
- - 'nearest' - -

The desired resampling method

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

The resampled rasters

-
- - - -
-
- Type -
-
- -TypedArray - - -
-
- - - - - - - - - - - - - -

(static) resampleNearest(valueArrays, inWidth, inHeight, outWidth, outHeight) → {Array.<TypedArray>}

- - - - - - -
-

Resample the input arrays using nearest neighbor value selection.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
valueArrays - - -Array.<TypedArray> - - - -

The input arrays to resample

inWidth - - -number - - - -

The width of the input rasters

inHeight - - -number - - - -

The height of the input rasters

outWidth - - -number - - - -

The desired width of the output rasters

outHeight - - -number - - - -

The desired height of the output rasters

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

The resampled rasters

-
- - - -
-
- Type -
-
- -Array.<TypedArray> - - -
-
- - - - - - - - - - - - - -

(static) resampleNearestInterleaved(valueArrays, inWidth, inHeight, outWidth, outHeight, samples) → {TypedArray}

- - - - - - -
-

Resample the pixel interleaved input array using nearest neighbor value selection.

-
- - - - - - - - - -
Parameters:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameTypeDescription
valueArrays - - -TypedArray - - - -

The input arrays to resample

inWidth - - -number - - - -

The width of the input rasters

inHeight - - -number - - - -

The height of the input rasters

outWidth - - -number - - - -

The desired width of the output rasters

outHeight - - -number - - - -

The desired height of the output rasters

samples - - -number - - - -

The number of samples per pixel for pixel -interleaved data

- - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Source:
-
- - - - - - - -
- - - - - - - - - - - - - - - -
Returns:
- - -
-

The resampled raster

-
- - - -
-
- Type -
-
- -TypedArray - - -
-
- - - - - - - - - - - - - -
- -
- - - - -
- - - -
- - - - - - - \ No newline at end of file diff --git a/docs/pool.js.html b/docs/pool.js.html deleted file mode 100644 index 496cad55..00000000 --- a/docs/pool.js.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - JSDoc: Source: pool.js - - - - - - - - - - -
- -

Source: pool.js

- - - - - - -
-
-
import { Pool as tPool, spawn, Worker, Transfer } from 'threads';
-
-const defaultPoolSize = typeof navigator !== 'undefined' ? navigator.hardwareConcurrency : null;
-
-/**
- * @module pool
- */
-
-/**
- * Pool for workers to decode chunks of the images.
- */
-class Pool {
-  /**
-   * @constructor
-   * @param {Number} size The size of the pool. Defaults to the number of CPUs
-   *                      available. When this parameter is `null` or 0, then the
-   *                      decoding will be done in the main thread.
-   * @param {Worker} worker The decoder worker, loaded and initialised. Enables
-   *                        loading the worker using worker-loader(or others) externally
-   *                        when using this library as a webpack dependency.
-   */
-  constructor(size = defaultPoolSize, worker = new Worker('./decoder.worker.js')) {
-    this.pool = tPool(() => spawn(worker), size);
-  }
-
-  /**
-   * Decode the given block of bytes with the set compression method.
-   * @param {ArrayBuffer} buffer the array buffer of bytes to decode.
-   * @returns {Promise.<ArrayBuffer>} the decoded result as a `Promise`
-   */
-  async decode(fileDirectory, buffer) {
-    return new Promise((resolve, reject) => {
-      this.pool.queue(async (decode) => {
-        try {
-          const data = await decode(fileDirectory, Transfer(buffer));
-          resolve(data);
-        } catch (err) {
-          reject(err);
-        }
-      });
-    });
-  }
-
-  destroy() {
-    this.pool.terminate(true);
-  }
-}
-
-export default Pool;
-
-
-
- - - - -
- - - -
- - - - - - - diff --git a/docs/resample.js.html b/docs/resample.js.html deleted file mode 100644 index 6d646e5d..00000000 --- a/docs/resample.js.html +++ /dev/null @@ -1,262 +0,0 @@ - - - - - JSDoc: Source: resample.js - - - - - - - - - - -
- -

Source: resample.js

- - - - - - -
-
-
/**
- * @module resample
- */
-
-function copyNewSize(array, width, height, samplesPerPixel = 1) {
-  return new (Object.getPrototypeOf(array).constructor)(width * height * samplesPerPixel);
-}
-
-/**
- * Resample the input arrays using nearest neighbor value selection.
- * @param {TypedArray[]} valueArrays The input arrays to resample
- * @param {number} inWidth The width of the input rasters
- * @param {number} inHeight The height of the input rasters
- * @param {number} outWidth The desired width of the output rasters
- * @param {number} outHeight The desired height of the output rasters
- * @returns {TypedArray[]} The resampled rasters
- */
-export function resampleNearest(valueArrays, inWidth, inHeight, outWidth, outHeight) {
-  const relX = inWidth / outWidth;
-  const relY = inHeight / outHeight;
-  return valueArrays.map((array) => {
-    const newArray = copyNewSize(array, outWidth, outHeight);
-    for (let y = 0; y < outHeight; ++y) {
-      const cy = Math.min(Math.round(relY * y), inHeight - 1);
-      for (let x = 0; x < outWidth; ++x) {
-        const cx = Math.min(Math.round(relX * x), inWidth - 1);
-        const value = array[(cy * inWidth) + cx];
-        newArray[(y * outWidth) + x] = value;
-      }
-    }
-    return newArray;
-  });
-}
-
-// simple linear interpolation, code from:
-// https://en.wikipedia.org/wiki/Linear_interpolation#Programming_language_support
-function lerp(v0, v1, t) {
-  return ((1 - t) * v0) + (t * v1);
-}
-
-/**
- * Resample the input arrays using bilinear interpolation.
- * @param {TypedArray[]} valueArrays The input arrays to resample
- * @param {number} inWidth The width of the input rasters
- * @param {number} inHeight The height of the input rasters
- * @param {number} outWidth The desired width of the output rasters
- * @param {number} outHeight The desired height of the output rasters
- * @returns {TypedArray[]} The resampled rasters
- */
-export function resampleBilinear(valueArrays, inWidth, inHeight, outWidth, outHeight) {
-  const relX = inWidth / outWidth;
-  const relY = inHeight / outHeight;
-
-  return valueArrays.map((array) => {
-    const newArray = copyNewSize(array, outWidth, outHeight);
-    for (let y = 0; y < outHeight; ++y) {
-      const rawY = relY * y;
-
-      const yl = Math.floor(rawY);
-      const yh = Math.min(Math.ceil(rawY), (inHeight - 1));
-
-      for (let x = 0; x < outWidth; ++x) {
-        const rawX = relX * x;
-        const tx = rawX % 1;
-
-        const xl = Math.floor(rawX);
-        const xh = Math.min(Math.ceil(rawX), (inWidth - 1));
-
-        const ll = array[(yl * inWidth) + xl];
-        const hl = array[(yl * inWidth) + xh];
-        const lh = array[(yh * inWidth) + xl];
-        const hh = array[(yh * inWidth) + xh];
-
-        const value = lerp(
-          lerp(ll, hl, tx),
-          lerp(lh, hh, tx),
-          rawY % 1,
-        );
-        newArray[(y * outWidth) + x] = value;
-      }
-    }
-    return newArray;
-  });
-}
-
-/**
- * Resample the input arrays using the selected resampling method.
- * @param {TypedArray[]} valueArrays The input arrays to resample
- * @param {number} inWidth The width of the input rasters
- * @param {number} inHeight The height of the input rasters
- * @param {number} outWidth The desired width of the output rasters
- * @param {number} outHeight The desired height of the output rasters
- * @param {string} [method = 'nearest'] The desired resampling method
- * @returns {TypedArray[]} The resampled rasters
- */
-export function resample(valueArrays, inWidth, inHeight, outWidth, outHeight, method = 'nearest') {
-  switch (method.toLowerCase()) {
-    case 'nearest':
-      return resampleNearest(valueArrays, inWidth, inHeight, outWidth, outHeight);
-    case 'bilinear':
-    case 'linear':
-      return resampleBilinear(valueArrays, inWidth, inHeight, outWidth, outHeight);
-    default:
-      throw new Error(`Unsupported resampling method: '${method}'`);
-  }
-}
-
-/**
- * Resample the pixel interleaved input array using nearest neighbor value selection.
- * @param {TypedArray} valueArrays The input arrays to resample
- * @param {number} inWidth The width of the input rasters
- * @param {number} inHeight The height of the input rasters
- * @param {number} outWidth The desired width of the output rasters
- * @param {number} outHeight The desired height of the output rasters
- * @param {number} samples The number of samples per pixel for pixel
- *                         interleaved data
- * @returns {TypedArray} The resampled raster
- */
-export function resampleNearestInterleaved(
-  valueArray, inWidth, inHeight, outWidth, outHeight, samples) {
-  const relX = inWidth / outWidth;
-  const relY = inHeight / outHeight;
-
-  const newArray = copyNewSize(valueArray, outWidth, outHeight, samples);
-  for (let y = 0; y < outHeight; ++y) {
-    const cy = Math.min(Math.round(relY * y), inHeight - 1);
-    for (let x = 0; x < outWidth; ++x) {
-      const cx = Math.min(Math.round(relX * x), inWidth - 1);
-      for (let i = 0; i < samples; ++i) {
-        const value = valueArray[(cy * inWidth * samples) + (cx * samples) + i];
-        newArray[(y * outWidth * samples) + (x * samples) + i] = value;
-      }
-    }
-  }
-  return newArray;
-}
-
-/**
- * Resample the pixel interleaved input array using bilinear interpolation.
- * @param {TypedArray} valueArrays The input arrays to resample
- * @param {number} inWidth The width of the input rasters
- * @param {number} inHeight The height of the input rasters
- * @param {number} outWidth The desired width of the output rasters
- * @param {number} outHeight The desired height of the output rasters
- * @param {number} samples The number of samples per pixel for pixel
- *                         interleaved data
- * @returns {TypedArray} The resampled raster
- */
-export function resampleBilinearInterleaved(
-  valueArray, inWidth, inHeight, outWidth, outHeight, samples) {
-  const relX = inWidth / outWidth;
-  const relY = inHeight / outHeight;
-  const newArray = copyNewSize(valueArray, outWidth, outHeight, samples);
-  for (let y = 0; y < outHeight; ++y) {
-    const rawY = relY * y;
-
-    const yl = Math.floor(rawY);
-    const yh = Math.min(Math.ceil(rawY), (inHeight - 1));
-
-    for (let x = 0; x < outWidth; ++x) {
-      const rawX = relX * x;
-      const tx = rawX % 1;
-
-      const xl = Math.floor(rawX);
-      const xh = Math.min(Math.ceil(rawX), (inWidth - 1));
-
-      for (let i = 0; i < samples; ++i) {
-        const ll = valueArray[(yl * inWidth * samples) + (xl * samples) + i];
-        const hl = valueArray[(yl * inWidth * samples) + (xh * samples) + i];
-        const lh = valueArray[(yh * inWidth * samples) + (xl * samples) + i];
-        const hh = valueArray[(yh * inWidth * samples) + (xh * samples) + i];
-
-        const value = lerp(
-          lerp(ll, hl, tx),
-          lerp(lh, hh, tx),
-          rawY % 1,
-        );
-        newArray[(y * outWidth * samples) + (x * samples) + i] = value;
-      }
-    }
-  }
-  return newArray;
-}
-
-/**
- * Resample the pixel interleaved input array using the selected resampling method.
- * @param {TypedArray} valueArray The input array to resample
- * @param {number} inWidth The width of the input rasters
- * @param {number} inHeight The height of the input rasters
- * @param {number} outWidth The desired width of the output rasters
- * @param {number} outHeight The desired height of the output rasters
- * @param {number} samples The number of samples per pixel for pixel
- *                                 interleaved data
- * @param {string} [method = 'nearest'] The desired resampling method
- * @returns {TypedArray} The resampled rasters
- */
-export function resampleInterleaved(valueArray, inWidth, inHeight, outWidth, outHeight, samples, method = 'nearest') {
-  switch (method.toLowerCase()) {
-    case 'nearest':
-      return resampleNearestInterleaved(
-        valueArray, inWidth, inHeight, outWidth, outHeight, samples,
-      );
-    case 'bilinear':
-    case 'linear':
-      return resampleBilinearInterleaved(
-        valueArray, inWidth, inHeight, outWidth, outHeight, samples,
-      );
-    default:
-      throw new Error(`Unsupported resampling method: '${method}'`);
-  }
-}
-
-
-
- - - - -
- - - -
- - - - - - - diff --git a/docs/scripts/linenumber.js b/docs/scripts/linenumber.js deleted file mode 100644 index 4354785c..00000000 --- a/docs/scripts/linenumber.js +++ /dev/null @@ -1,25 +0,0 @@ -/*global document */ -(() => { - const source = document.getElementsByClassName('prettyprint source linenums'); - let i = 0; - let lineNumber = 0; - let lineId; - let lines; - let totalLines; - let anchorHash; - - if (source && source[0]) { - anchorHash = document.location.hash.substring(1); - lines = source[0].getElementsByTagName('li'); - totalLines = lines.length; - - for (; i < totalLines; i++) { - lineNumber++; - lineId = `line${lineNumber}`; - lines[i].id = lineId; - if (lineId === anchorHash) { - lines[i].className += ' selected'; - } - } - } -})(); diff --git a/docs/scripts/prettify/Apache-License-2.0.txt b/docs/scripts/prettify/Apache-License-2.0.txt deleted file mode 100644 index d6456956..00000000 --- a/docs/scripts/prettify/Apache-License-2.0.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/docs/scripts/prettify/lang-css.js b/docs/scripts/prettify/lang-css.js deleted file mode 100644 index 041e1f59..00000000 --- a/docs/scripts/prettify/lang-css.js +++ /dev/null @@ -1,2 +0,0 @@ -PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", -/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); diff --git a/docs/scripts/prettify/prettify.js b/docs/scripts/prettify/prettify.js deleted file mode 100644 index eef5ad7e..00000000 --- a/docs/scripts/prettify/prettify.js +++ /dev/null @@ -1,28 +0,0 @@ -var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; -(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= -[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), -l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, -q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, -q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, -"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), -a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} -for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], -"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], -H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], -J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ -I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), -["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", -/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), -["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", -hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= -!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p th:last-child { border-right: 1px solid #ddd; } - -.ancestors, .attribs { color: #999; } -.ancestors a, .attribs a -{ - color: #999 !important; - text-decoration: none; -} - -.clear -{ - clear: both; -} - -.important -{ - font-weight: bold; - color: #950B02; -} - -.yes-def { - text-indent: -1000px; -} - -.type-signature { - color: #aaa; -} - -.name, .signature { - font-family: Consolas, Monaco, 'Andale Mono', monospace; -} - -.details { margin-top: 14px; border-left: 2px solid #DDD; } -.details dt { width: 120px; float: left; padding-left: 10px; padding-top: 6px; } -.details dd { margin-left: 70px; } -.details ul { margin: 0; } -.details ul { list-style-type: none; } -.details li { margin-left: 30px; padding-top: 6px; } -.details pre.prettyprint { margin: 0 } -.details .object-value { padding-top: 0; } - -.description { - margin-bottom: 1em; - margin-top: 1em; -} - -.code-caption -{ - font-style: italic; - font-size: 107%; - margin: 0; -} - -.source -{ - border: 1px solid #ddd; - width: 80%; - overflow: auto; -} - -.prettyprint.source { - width: inherit; -} - -.source code -{ - font-size: 100%; - line-height: 18px; - display: block; - padding: 4px 12px; - margin: 0; - background-color: #fff; - color: #4D4E53; -} - -.prettyprint code span.line -{ - display: inline-block; -} - -.prettyprint.linenums -{ - padding-left: 70px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -.prettyprint.linenums ol -{ - padding-left: 0; -} - -.prettyprint.linenums li -{ - border-left: 3px #ddd solid; -} - -.prettyprint.linenums li.selected, -.prettyprint.linenums li.selected * -{ - background-color: lightyellow; -} - -.prettyprint.linenums li * -{ - -webkit-user-select: text; - -moz-user-select: text; - -ms-user-select: text; - user-select: text; -} - -.params .name, .props .name, .name code { - color: #4D4E53; - font-family: Consolas, Monaco, 'Andale Mono', monospace; - font-size: 100%; -} - -.params td.description > p:first-child, -.props td.description > p:first-child -{ - margin-top: 0; - padding-top: 0; -} - -.params td.description > p:last-child, -.props td.description > p:last-child -{ - margin-bottom: 0; - padding-bottom: 0; -} - -.disabled { - color: #454545; -} diff --git a/docs/styles/prettify-jsdoc.css b/docs/styles/prettify-jsdoc.css deleted file mode 100644 index 5a2526e3..00000000 --- a/docs/styles/prettify-jsdoc.css +++ /dev/null @@ -1,111 +0,0 @@ -/* JSDoc prettify.js theme */ - -/* plain text */ -.pln { - color: #000000; - font-weight: normal; - font-style: normal; -} - -/* string content */ -.str { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a keyword */ -.kwd { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* a comment */ -.com { - font-weight: normal; - font-style: italic; -} - -/* a type name */ -.typ { - color: #000000; - font-weight: normal; - font-style: normal; -} - -/* a literal value */ -.lit { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* punctuation */ -.pun { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* lisp open bracket */ -.opn { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* lisp close bracket */ -.clo { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* a markup tag name */ -.tag { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a markup attribute name */ -.atn { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a markup attribute value */ -.atv { - color: #006400; - font-weight: normal; - font-style: normal; -} - -/* a declaration */ -.dec { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* a variable name */ -.var { - color: #000000; - font-weight: normal; - font-style: normal; -} - -/* a function name */ -.fun { - color: #000000; - font-weight: bold; - font-style: normal; -} - -/* Specify class=linenums on a pre to get line numbering */ -ol.linenums { - margin-top: 0; - margin-bottom: 0; -} diff --git a/docs/styles/prettify-tomorrow.css b/docs/styles/prettify-tomorrow.css deleted file mode 100644 index b6f92a78..00000000 --- a/docs/styles/prettify-tomorrow.css +++ /dev/null @@ -1,132 +0,0 @@ -/* Tomorrow Theme */ -/* Original theme - https://github.com/chriskempson/tomorrow-theme */ -/* Pretty printing styles. Used with prettify.js. */ -/* SPAN elements with the classes below are added by prettyprint. */ -/* plain text */ -.pln { - color: #4d4d4c; } - -@media screen { - /* string content */ - .str { - color: #718c00; } - - /* a keyword */ - .kwd { - color: #8959a8; } - - /* a comment */ - .com { - color: #8e908c; } - - /* a type name */ - .typ { - color: #4271ae; } - - /* a literal value */ - .lit { - color: #f5871f; } - - /* punctuation */ - .pun { - color: #4d4d4c; } - - /* lisp open bracket */ - .opn { - color: #4d4d4c; } - - /* lisp close bracket */ - .clo { - color: #4d4d4c; } - - /* a markup tag name */ - .tag { - color: #c82829; } - - /* a markup attribute name */ - .atn { - color: #f5871f; } - - /* a markup attribute value */ - .atv { - color: #3e999f; } - - /* a declaration */ - .dec { - color: #f5871f; } - - /* a variable name */ - .var { - color: #c82829; } - - /* a function name */ - .fun { - color: #4271ae; } } -/* Use higher contrast and text-weight for printable form. */ -@media print, projection { - .str { - color: #060; } - - .kwd { - color: #006; - font-weight: bold; } - - .com { - color: #600; - font-style: italic; } - - .typ { - color: #404; - font-weight: bold; } - - .lit { - color: #044; } - - .pun, .opn, .clo { - color: #440; } - - .tag { - color: #006; - font-weight: bold; } - - .atn { - color: #404; } - - .atv { - color: #060; } } -/* Style */ -/* -pre.prettyprint { - background: white; - font-family: Consolas, Monaco, 'Andale Mono', monospace; - font-size: 12px; - line-height: 1.5; - border: 1px solid #ccc; - padding: 10px; } -*/ - -/* Specify class=linenums on a pre to get line numbering */ -ol.linenums { - margin-top: 0; - margin-bottom: 0; } - -/* IE indents via margin-left */ -li.L0, -li.L1, -li.L2, -li.L3, -li.L4, -li.L5, -li.L6, -li.L7, -li.L8, -li.L9 { - /* */ } - -/* Alternate shading for lines */ -li.L1, -li.L3, -li.L5, -li.L7, -li.L9 { - /* */ }