Skip to main content

Crate copc_converter

Crate copc_converter 

Source
Expand description

Fast, memory-efficient converter from LAS/LAZ to COPC (Cloud-Optimized Point Cloud).

§Pipeline

The conversion pipeline is enforced at compile time via typestate:

use copc_converter::{Pipeline, PipelineConfig};

let config = PipelineConfig {
    memory_budget: 12_884_901_888,
    temp_dir: None,
    temporal_index: false,
    temporal_stride: 1000,
    progress: None,
    chunk_target_override: None,
    temp_compression: copc_converter::TempCompression::None,
    node_storage: copc_converter::NodeStorage::Files,
};
let files = copc_converter::collect_input_files("input.laz".into()).unwrap();

Pipeline::scan(&files, config).unwrap()
    .validate().unwrap()
    .distribute().unwrap()
    .build().unwrap()
    .write("output.copc.laz").unwrap();

Structs§

Built
Pipeline stage: octree has been built with LOD thinning.
ChunkPlan
Re-exported chunk plan types so the binary can build a report from them. Output of [analyze_chunking]: the full chunk plan plus useful metadata about how it was computed.
Distributed
Pipeline stage: points have been distributed to leaf voxels.
HeaderBoundsMismatch
Re-exported chunk plan types so the binary can build a report from them. Per-axis differences between the LAS header bounds and the actual round-tripped point coordinates observed during counting.
Pipeline
Type-safe conversion pipeline. Each stage exposes only the next step.
PipelineConfig
Configuration for the conversion pipeline.
PlannedChunk
Re-exported chunk plan types so the binary can build a report from them. A single chunk in the plan: an octree voxel at some level, plus its estimated point count derived from the counting grid.
Scanned
Pipeline stage: input files have been scanned.
Validated
Pipeline stage: inputs have been validated.

Enums§

Error
Errors returned by the conversion pipeline.
NodeStorage
Storage layout for per-node point data during the build stage.
ProgressEvent
Events emitted during pipeline execution.
TempCompression
Compression codec for distribute-stage scratch files.

Traits§

ProgressObserver
Observer for pipeline progress events. Implement this to receive callbacks.

Functions§

collect_input_files
Expand a single input path into a list of LAZ/LAS files. If raw is a directory, all .laz/.las files in it are returned (sorted). If raw is a file, it is returned as-is.
compute_chunk_target
Re-exported chunk plan types so the binary can build a report from them. Compute the dynamic chunk target size from the memory budget and worker count, applying clamping and a parallelism floor.
select_grid_size
Re-exported chunk plan types so the binary can build a report from them. Pick the counting grid resolution based on total point count and the memory budget.

Type Aliases§

Result
Result type for the conversion pipeline.