Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/modules/las/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The `@loaders.gl/las` module supports the [LASER file format](/docs/modules/las/formats/las) (LAS) and its compressed version (LAZ).

LAZ point formats 0-10 are supported by the opt-in `typescript` backend. Legacy Point10/GPS/RGB/Byte items require LASzip version 2, legacy WavePacket13 uses version 1, and modern items support versions 2-4; support in the `copc` and `laz-rs` backends depends on their bundled decoder versions. The default `laz-perf` backend remains limited to LAS 1.3 and point formats 0-3. See the [LAS/LAZ implementation limits](/docs/modules/las/formats/las#current-implementation-limits) for backend and point-format details.
LAZ point formats 0-10 are supported by the opt-in `typescript` backend for documented LASzip codec combinations. Legacy Point10/GPS/RGB/Byte items require item version 2, WavePacket13 requires version 1, and modern items support versions 2-4; PDRF 9/10 WavePacket14 supports versions 3-4. Arrow output exposes only positions, intensity, classification, and RGB, while the raw APIs preserve complete supported point records. Support in the `copc` and `laz-rs` backends depends on their bundled decoder versions. The default `laz-perf` backend remains limited to LAS 1.3 and point formats 0-3. See the [LAS/LAZ implementation limits](/docs/modules/las/formats/las#current-implementation-limits) for exact codec, point-format, fixture, and streaming details.

## Installation

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/las/api-reference/las-loader.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ const table = await load(url, LASLoader, {

## TypeScript LAZ Streaming

With `las.backend: 'typescript'`, `parseInBatches` consumes compressed LAZ input incrementally. Legacy interleaved PDRF 0-5 chunks can emit complete Arrow batches before the current compressed chunk or file has finished arriving. PDRF 6-10 table parsing emits after complete layered LAZ chunks are available and selectively decodes the field layers represented by the returned Arrow schema without copying compressed field layers into temporary readers. Legacy Point10/GPS/RGB/Byte item version 2, WavePacket13 item version 1, and modern item versions 2-4 are supported. Legacy LASzip item version 1 uses a different codec and is rejected. NIR, PDRF 4/5/9/10 waveform packet references, and Extra Bytes remain available only through raw-record decoding because they are not yet represented in the returned Arrow schema. Waveform sample payloads referenced by those records are not loaded. The raw chunk decoder remains available when complete LAS point records, including currently unexposed fields, are required.
With `las.backend: 'typescript'`, `parseInBatches` consumes compressed LAZ input incrementally. Legacy interleaved PDRF 0-5 chunks can emit complete Arrow batches before the current compressed chunk or file has finished arriving. PDRF 6-10 table parsing emits after complete layered LAZ chunks are available and selectively decodes only the field layers represented by the returned Arrow schema. Complete-buffer `parse` uses the same direct-column path instead of allocating and reparsing complete raw records. Legacy Point10/GPS/RGB/Byte item version 2, WavePacket13 item version 1, and modern item versions 2-4 are supported. Legacy LASzip item version 1 uses a different codec and is rejected. NIR, PDRF 4/5/9/10 waveform packet references, and Extra Bytes remain available only through raw-record decoding because they are not yet represented in the returned Arrow schema. Waveform sample payloads referenced by those records are not loaded. The raw chunk decoder remains available when complete LAS point records, including currently unexposed fields, are required.

Legacy point-level progress uses bounded geometric replay: when more compressed bytes arrive, the decoder replays previously emitted points through a record-sized scratch buffer and writes only new points into reusable output batches. This avoids committing partially mutated arithmetic state and bounds retry work to a linear factor of the compressed chunk size, but it retains the compressed chunk until completion. Layered PDRF 6-10 remains chunk-streaming because its independent field ranges must be available before complete rows can be assembled. Variable-size chunk point counts are stored in the LASzip chunk table at EOF, so a forward-only variable-chunk input is buffered until the table is available. See the [LAS/LAZ format implementation limits](/docs/modules/las/formats/las#current-implementation-limits) for supported point formats and remaining limitations.
16 changes: 10 additions & 6 deletions docs/modules/las/api-reference/las-writer.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ const arrayBuffer = await encode(pointCloud, LASWriter, {

## Data Format

`LASWriter` accepts Mesh Arrow tables and legacy Mesh objects. Legacy Mesh input is normalized through the Mesh Arrow table conversion path before LAS binary data is encoded.
`LASWriter` accepts Mesh Arrow tables and legacy Mesh objects. Arrow table input is normalized to the writer's Mesh representation before LAS binary data is encoded.

The writer requires a `POSITION` attribute. It writes `COLOR_0`, `intensity`, and `classification` attributes when present. `LASWriter` writes uncompressed LAS 1.2 output; it does not write LAZ-compressed output.
The writer requires a `POSITION` attribute. It writes `COLOR_0`, `intensity`, and `classification` attributes when present. It can select LAS versions 1.0-1.4 and PDRF 0-8, but fields without a corresponding input attribute, including GPS time, waveform references, NIR, return flags, and scanner metadata, are zero-filled. Current round-trip coverage targets default LAS 1.2 and LAS 1.4/PDRF 7; full conformance for every selectable version/PDRF combination is not claimed. `LASWriter` does not write LAZ-compressed or COPC output.

## Options

| Option | Type | Default | Description |
| ------------ | -------------------------- | ----------------------- | --------------------------------------------------------------------------- |
| `las.scale` | `[number, number, number]` | `[0.001, 0.001, 0.001]` | Coordinate scale factors used to quantize positions into LAS integer coordinates. |
| `las.offset` | `[number, number, number]` | Mesh minimum position | Coordinate offsets used to quantize positions into LAS integer coordinates. |
| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `las.format` | `'las' \| 'laz' \| 'copc'` | `'las'` | Output container. Only `'las'` is implemented; compressed formats throw. |
| `las.version` | `'1.0'` through `'1.4'` | `'1.2'` or `'1.4'` | LAS header version. The default is 1.4 for modern PDRFs and 1.2 otherwise. |
| `las.pointDataRecordFormat` | `0` through `8` | Derived | Point record layout. The default depends on version and whether `COLOR_0` is present. |
| `las.scale` | `[number, number, number]` | `[0.001, 0.001, 0.001]` | Coordinate scale factors used to quantize positions into LAS integer coordinates. |
| `las.offset` | `[number, number, number]` | Mesh minimum position | Coordinate offsets used to quantize positions into LAS integer coordinates. |
| `las.colorDepth` | `number \| string` | - | Declares the source color component depth. |
Loading
Loading