gis-tools-ts - v0.6.0
    Preparing search index...

    Class GeoTIFFImage

    A Container for a GeoTIFF image

    Index

    Constructors

    • Parameters

      • reader: Reader

        the reader containing the input data

      • imageDirectory: ImageFileDirectory

        the image directory

      • littleEndian: boolean

        true if little endian false if big endian

      • definitions: typeof ProjectionBase[] = []

        an array of projection definitions for the transformer if needed

      • epsgCodes: Record<string, string> = {}

        a record of EPSG codes to use for the transformer if needed

      • gridStore: GridReader[]

        the grid readers to utilize if needed

      Returns GeoTIFFImage

    Accessors

    • get blockWidth(): number

      Get the block width

      Returns number

      • the block width
    • get bytesPerPixel(): 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.

      Returns number

      the bytes per pixel

    • get height(): number

      Get the image height

      Returns number

      • the image height
    • get origin(): VectorPoint

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

      Returns VectorPoint

      The origin as a vector

    • get originLL(): VectorPoint

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

      Returns VectorPoint

      The origin as a lon-lat vector

    • get pixelIsArea(): boolean

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

      Returns boolean

      Whether the pixels are a point

    • get resolution(): VectorPoint

      Returns the image resolution as a XYZ-vector. When the image has no affine transformation, then an exception is thrown. in cases when the current image does not have the required tags on its own.

      Returns VectorPoint

      The resolution as a vector

    • get resolutionLL(): VectorPoint

      Returns the image resolution as a XYZ-vector in lon-lat space. When the image has no affine transformation, then an exception is thrown. in cases when the current image does not have the required tags on its own.

      Returns VectorPoint

      The resolution as a lon-lat vector

    • get samplesPerPixel(): number

      Returns the number of samples per pixel.

      Returns number

      the number of samples per pixel

    • get tiePoints(): TiePoint[]

      Returns an array of tiepoints.

      Returns TiePoint[]

      • An array of tiepoints
    • get tileHeight(): number

      Get the tile height

      Returns number

      • the tile height
    • get tileWidth(): number

      Get the tile width

      Returns number

      • the tile width
    • get width(): number

      Get the image width

      Returns number

      • the image width

    Methods

    • Returns the number of bits per sample

      Parameters

      • sampleIndex: number = 0

        the sample index to start at

      Returns number

      the number of bits per sample at the sample index

    • Get the block height

      Parameters

      • y: number

        the y coordinate of the block

      Returns number

      • the block height
    • 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

      • transform: boolean = true

        apply affine transformation or proj4 transformation

      Returns [minX: number, minY: number, maxX: number, maxY: number]

      The bounding box

    • Returns the reader for a sample

      Parameters

      • sampleIndex: number

        the index of the sample

      Returns (offset: number, littleEndian: boolean) => number

      • a function to read each sample value
    • Returns the RGBA raster data of the image.

      Returns Promise<Raster>

      • The RGBA raster data
    • Returns the sample format

      Parameters

      • sampleIndex: number = 0

        the sample index to start at

      Returns number

      the sample format code

    • Get the data for a tile or strip

      Parameters

      • x: number

        the tile or strip x coordinate

      • y: number

        the tile or strip y coordinate

      • sample: number

        the sample

      Returns Promise<ArrayBufferLike>

      • the data as a buffer
    • Get a value in the image

      Parameters

      • x: number

        the x coordinate

      • y: number

        the y coordinate

      • invY: boolean = false

        if true, the y coordinate is inverted

      • samples: number[] = ...

        Samples to read from the image

      Returns Promise<number[]>

      • the sample
    • Apply the predictor if necessary

      Parameters

      • data: ArrayBufferLike

        the raw data

      Returns ArrayBufferLike

      • the data with the predictor applied
    • Returns the raster data of the image.

      Parameters

      • samples: number[] = ...

        Samples to read from the image

      Returns Promise<Raster>

      • The raster data
    • Convert the data format and bits per sample to the appropriate array type

      Parameters

      • raster: number[]

        the data

      Returns ArrayTypes

      • the array