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

    Class NetCDFReader<M, D, P>

    NetCDF v3.x Reader

    Read the NetCDF v3.x file format See specification Implements the FeatureIterator interface

    import { NetCDFReader } from 'gis-tools-ts';
    import { FileReader } from 'gis-tools-ts/file';
    // or use the MMapReader if using Bun:
    // import { MMapReader } from 'gis-tools-ts/mmap';

    const reader = new NetCDFReader(new FileReader('./data.nc'));

    // read the features
    for (const feature of reader) {
    console.log(feature);
    }

    Type Parameters

    • M = Record<string, unknown>
    • D extends MValue = MValue
    • P extends Properties = Properties

    Implements

    Index

    Constructors

    • Type Parameters

      • M = Record<string, unknown>
      • D extends Properties = Properties
      • P extends Properties = Properties

      Parameters

      • input: ReaderInputs

        The data as either a buffer or file reader

      • Optionaloptions: NetCDFReaderOptions

        User defined options to apply when reading the NetCDF file

      Returns NetCDFReader<M, D, P>

    Properties

    dimensions: CDFDimension[] = []

    List of dimensions

    globalAttributes: CDFAttributes = {}

    List of global attributes

    is64: boolean

    Describes if offsets are 32 or 64 bits

    variables: CDFVariable[] = []

    List of variables

    Methods

    • Generator to iterate over each (Geo|S2)JSON object in the file

      Returns AsyncGenerator<VectorFeature<M, D, P>>

    • Retrieves the data for a given variable

      Parameters

      • variableName: string

        Name of the variable to search or variable object

      Returns undefined | CDFValue[]

      The variable values