voxelkloudBack to the project

DOCS / PACKAGE GUIDE

@voxelkloud/format-las
Shared LAS record decoder

This package owns the record layout and byte-to-point conversion logic. The higher-level format drivers reuse it instead of each decoding LAS bytes on their own.

npm install @voxelkloud/format-lassource

Describe the layout

Start with the LAS layout, then let the decoder derive the fields it needs for the current record format.

import { createLasDecodePlan, decodeLasRecords, lasLayout } from '@voxelkloud/format-las'

const layout = lasLayout({ format: 3, pointSize: 34, bounds })
const plan = createLasDecodePlan(layout, { computeBounds: true })
const decoded = decodeLasRecords(plan, node, records, { computeBounds: true })

Decode once, reuse everywhere

COPC, EPT, and the single-file builder all need the same point-record parsing work, so this package keeps that layer shared.

  • Owns the field layout and Extra Bytes VLR handling.
  • Keeps LAS decoding separate from the format-specific tree logic.
  • Useful when you need the record layer without a driver around it.