SDK JS
    Preparing search index...

    Browser LEPCC (Esri Limited Error Point Cloud Compression) decoder over the vendored pure-Rust turbolepcc wasm. LEPCC stores each point attribute (XYZ / RGB / intensity / LAS flag bytes) as its own self-describing blob; call the matching decode* method for the blob you hold, or blobType to identify one first. Decode-only — the encoder is not present in the .wasm.

    import { LepccDecoder } from '@bitruvius/turbo-lepcc';

    const d = new LepccDecoder();
    const xyz = await d.decodeXyz(xyzBlob); // Float64Array, length 3·N
    const rgb = await d.decodeRgb(rgbBlob); // Uint8Array, length 3·N
    const inten = await d.decodeIntensity(intBlob); // Uint16Array, length N

    // Cross-origin (e.g. a CDN bundle) — fetch the wasm yourself and pass the bytes:
    const wasmBytes = await (await fetch('https://cdn.example.com/turbolepcc_wasm_bg.wasm')).arrayBuffer();
    const d2 = new LepccDecoder({ wasmInit: { wasmBytes } });
    Index

    Constructors

    Methods

    • Identify a LEPCC blob's attribute type without fully decoding it.

      Parameters

      • bytes: Uint8Array

        A single LEPCC attribute blob.

      Returns Promise<string>

      The blob's attribute type; see LepccBlobType.

      If the bytes are not a recognizable LEPCC blob.

    • Decode a per-point LAS flag-bytes LEPCC blob.

      Parameters

      • bytes: Uint8Array

        A LEPCC flag-bytes attribute blob.

      Returns Promise<Uint8Array<ArrayBufferLike>>

      A Uint8Array of length N (one packed LAS flag byte per point).

      If the blob is malformed or is not a flag-bytes blob.

    • Decode a per-point intensity LEPCC blob.

      Parameters

      • bytes: Uint8Array

        A LEPCC intensity attribute blob.

      Returns Promise<Uint16Array<ArrayBufferLike>>

      A Uint16Array of length N (one intensity value per point).

      If the blob is malformed or is not an intensity blob.

    • Decode an RGB-color LEPCC blob.

      Parameters

      • bytes: Uint8Array

        A LEPCC rgb attribute blob.

      Returns Promise<Uint8Array<ArrayBufferLike>>

      A Uint8Array of length 3·N — r, g, b interleaved per point, each channel 0–255.

      If the blob is malformed or is not an rgb blob.

    • Decode an XYZ-position LEPCC blob.

      Parameters

      • bytes: Uint8Array

        A LEPCC xyz attribute blob.

      Returns Promise<Float64Array<ArrayBufferLike>>

      A Float64Array of length 3·N — x, y, z interleaved per point, in the source point cloud's own coordinate units (no projection applied).

      If the blob is malformed or is not an xyz blob.