geotiff.js
    Preparing search index...

    Class GeoTIFFImage

    GeoTIFF sub-file image.

    Constructors

    Properties

    fileDirectory: ImageFileDirectory
    isTiled: boolean
    littleEndian: boolean
    planarConfiguration: 1 | 2
    source: BaseSource
    tiles: Promise<ArrayBufferLike>[] | null

    Methods

    • Parameters

      • sampleIndex: number
      • sizeOrData: number | ArrayBufferLike

      Returns TypedArray

    • Parameters

      • sampleIndex: number = 0

      Returns number

    • Parameters

      • y: number

      Returns number

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

      Parameters

      • Optionaltilegrid: boolean = false

        If true return extent for a tilegrid without adjustment for ModelTransformation.

      Returns number[]

      The bounding box

    • 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

    • 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

      • Optionalsample: number | null = null

        The sample index.

      Returns Promise<Record<string, unknown> | null>

      The GDAL metadata items

    • Returns the GDAL nodata value

      Returns number | null

    • Returns the height of the image.

      Returns number

      the height of the image

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

      Returns number[]

      The origin as a vector

    • Parameters

      • sampleIndex: number

      Returns (this: DataView, byteOffset: number, littleEndian: boolean) => number

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

      Parameters

      • OptionalreferenceImage: GeoTIFFImage | null = 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 number[]

      The resolution as a vector

    • Parameters

      • i: number

      Returns number

    • Parameters

      • sampleIndex: number = 0

      Returns number

    • Returns the number of samples per pixel.

      Returns number

      the number of samples per pixel

    • Returns an array of tiepoints.

      Returns Promise<{ i: number; j: number; k: number; x: number; y: number; z: number }[]>

      the tiepoints

    • Returns the height of each tile.

      Returns number

      the height of each tile

    • Returns the decoded strip or tile.

      Parameters

      • 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: default | DecoderWorker

        the decoder or decoder pool

      • Optionalsignal: AbortSignal

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

      Returns Promise<{ data: ArrayBufferLike; sample: number; x: number; y: number }>

      the decoded strip or tile

    • Returns the width of each tile.

      Returns number

      the width of each tile

    • Returns the width of the image.

      Returns number

      the width of the image

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

      Returns boolean

      Whether the pixels are a point