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

    Class NewLineDelimitedJSONReader<M, D, P>

    NewLine Delimited JSON Reader

    Parse (Geo|S2)JSON from a file that is in a newline-delimited format Implements the FeatureIterator interface

    import { NewLineDelimitedJSONReader } from 'gis-tools-ts';
    import { FileReader } from 'gis-tools-ts/file';

    const reader = new NewLineDelimitedJSONReader(new FileReader('./data.geojsonld'));

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

    Type Parameters

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

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Methods

    Constructors

    • Type Parameters

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

      Parameters

      • input: ReaderInputs

        the input to parse from

      • seperator: string = '\n'

        the newline delimiter. Default is "\n" but can be "\r\n" or "\r"

      Returns NewLineDelimitedJSONReader<M, D, P>

    Methods

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

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