copc_converter
A fast, memory-efficient converter that turns LAS/LAZ point cloud files into COPC (Cloud-Optimized Point Cloud) files.
Features
- Produces spec-compliant COPC 1.0 files (LAS 1.4, point format 6, 7, or 8 — automatically chosen from input)
- Merges multiple input files into a single COPC output
- Out-of-core processing with a configurable memory budget — handles datasets larger than RAM
- Parallel reading, octree construction, and LAZ compression via rayon
- Preserves WKT CRS from input files
- Optional temporal index for GPS-time-based filtering (spec)
Installation
Requires Rust 1.85+.
From crates.io
From source
This installs the copc_converter binary to ~/.cargo/bin/, which should be on your PATH.
Pre-built binaries
Download pre-built binaries from the GitHub releases page. These are built for broad compatibility and run on any machine.
For best performance, prefer installing from source via cargo install — this automatically compiles with target-cpu=native, optimizing for your specific CPU's instruction set (AVX2, NEON, etc.).
Usage
# Single file
# Directory of LAZ/LAS files
Options
| Flag | Description | Default |
|---|---|---|
--memory-limit |
Max memory budget (16G, 4096M, etc.) |
auto-detected |
--threads |
Max parallel threads | all cores |
--temp-dir |
Directory for intermediate files | system temp |
--temporal-index |
Write a temporal index EVLR for time-based queries | off |
--temporal-stride |
Sampling stride for the temporal index (every n-th point) | 1000 |
--progress |
Progress output format: bar, plain, or json |
bar |
Examples
# With temporal index (useful for multi-pass mobile mapping data)
Library usage
The crate exposes a typestate pipeline API that enforces correct step ordering at compile time:
use ;
let files = collect_input_files?;
let config = PipelineConfig ;
scan?
.validate?
.distribute?
.build?
.write?;
Tools
Optional analysis tools are available behind the tools feature:
compare_copc
Side-by-side comparison of two COPC files over HTTP (headers + hierarchy only, no point data):
Prints node counts, point distribution, compressed sizes, and compression ratios per octree level.
inspect_temporal
Inspect the temporal index EVLR of a COPC file:
Prints GPS time range, per-level temporal coverage, a time histogram showing node overlap across time windows, and sample density stats.
How it works
- Scan — reads headers from all input files in parallel to determine bounds, CRS, point format, and point count.
- Validate — checks that all input files share the same CRS and point format, and selects the appropriate COPC output format (6, 7, or 8).
- Distribute — reads every point, assigns it to an octree leaf voxel, and writes it to a temporary file on disk.
- Build — constructs the octree bottom-up, thinning points at each level to produce multi-resolution LODs.
- Write — encodes and compresses nodes in parallel into a single COPC file with a hierarchy EVLR for spatial indexing.
License
MIT