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

    Class LASReader

    LAS Reader

    Reads LAS data. Supports up to the LAS 1.4 specification. See specification Implements the FeatureIterator interface

    Data is stored like so:

    |            PUBLIC HEADER BLOCK           |
    | VARIABLE LENGTH RECORDS |
    | POINT DATA RECORDS |
    import { LASReader } 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 LASReader(new FileReader('./data.las'));

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

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    • Parameters

      • input: ReaderInputs

        The LAS input data from a reader/buffer

      • 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

      • gridStores: GridReader[] = []

        an array of grid readers if needed

      • dontTransform: boolean = false

        if you set to true, the source projection is kept

      Returns LASReader

    Properties

    dontTransform: boolean = false

    if you set to true, the source projection is kept

    Accessors

    • get length(): number

      Get the number of points stored

      Returns number

      • the number of points

    Methods

    • Generator to iterate over each WGS84 lon-lat point

      Returns AsyncGenerator<VectorFeature<undefined, LASFormat, Properties>>

    • Reads a point in at index

      Parameters

      • index: number

        The index of the point to read

      Returns VectorPointM<LASFormat>

      • The parsed point