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

    Class GeoTIFFReader

    GeoTIFF Reader

    This class reads a GeoTIFF file and returns a list of GeoTIFF images. Implements the FeatureIterator interface.

    import { ALL_DEFINITIONS, EPSG_CODES, GeoTIFFReader } from 'gis-tools-ts';
    import { FileReader } from 'gis-tools-ts/file';

    const fileReader = new FileReader(`${__dirname}/fixtures/utm.tif`);
    const geotiffReader = new GeoTIFFReader(fileReader, ALL_DEFINITIONS, EPSG_CODES);

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    reader: Reader

    the geotiff reader to parse data from

    Accessors

    • get bigTiff(): boolean

      Returns boolean

      • the bigTIFF flag
    • get length(): number

      Returns number

      • the number of images in the GeoTIFF
    • get littleEndian(): boolean

      Returns boolean

      • the littleEndian flag

    Methods

    • Iterate through each image and return a vector feature

      Returns AsyncGenerator<
          VectorFeature<
              GeoTIFFMetadata,
              RGBA,
              Properties,
              VectorMultiPointGeometry<RGBA>,
          >,
      >

    • Add a grid reader

      Parameters

      • key: string

        the key or name of the grid

      • input: ReaderInputs

        the input data to parse

      Returns void

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

      Parameters

      • index: number = 0

        the index of the image to get [Default=0]

      Returns GeoTIFFImage

      • the image at the given index