geotiff.js
    Preparing search index...

    Class GeoTIFF

    The abstraction for a whole GeoTIFF file.

    Hierarchy

    • GeoTIFFBase
      • GeoTIFF

    Constructors

    • Parameters

      • source: BaseSource

        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.

      • Optionaloptions: GeoTIFFOptions = {}

        further options.

      Returns GeoTIFF

    Properties

    bigTiff: boolean
    cache: boolean
    firstIFDOffset: number
    ghostValues: Record<string, unknown> | null
    ifdRequests: (Promise<ImageFileDirectory> | undefined)[]
    littleEndian: boolean
    source: BaseSource

    Methods

    • 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.

      Returns false | Promise<void>

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

      Parameters

      • Optionalindex: number = 0

        the index of the image to return.

      Returns Promise<GeoTIFFImage>

      the image at the given index

    • Returns the count of the internal subfiles.

      Returns Promise<number>

      the number of internal subfile images

    • Parameters

      • offset: number
      • Optionalsize: number

      Returns Promise<default>

    • (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]GeoTIFFImage#readRasters method of the selected image is called and the result returned.

      Parameters

      Returns Promise<ReadRasterResult>

      the decoded array(s), with height and width, as a promise

      GeoTIFFImage.readRasters

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

      Parameters

      • source: BaseSource

        The source of data to parse from.

      • Optionaloptions: GeoTIFFOptions

        Additional options.

      • Optionalsignal: AbortSignal

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

      Returns Promise<GeoTIFF>