Skip to content

BUILD_COPC ​

Converts a LAS/LAZ point cloud into a COPC (Cloud Optimized Point Cloud) file using PDAL. The step reads the input point cloud and rewrites it using the COPC writer, producing a spatially indexed LAZ file optimized for streaming, random access, and web delivery. If the input is already a valid COPC file, it is used as the output as-is and no rebuild runs.

COPC preserves all points and attributes from the original dataset but reorganizes the file into a hierarchical octree structure that enables efficient partial reads. This format is commonly used for cloud-hosted point cloud visualization and analytics.

Typical use: preparing LiDAR datasets for web distribution, streaming point cloud systems, or analytics pipelines. After REPROJECT_LAS, which already writes COPC, this step only validates and delivers the file.


Contract ​

TypeBUILD_COPC
Acceptsinput_las: las
Producesoutput_copc: las
Paramsnone

Note: the output artifact type is las because COPC is a LAS-compatible format (a spatially indexed LAZ container).


Inputs ​

SlotTypeDescription
input_laslasSource point cloud dataset (LAS, LAZ or COPC)

Outputs ​

SlotTypeDescription
output_copclasCOPC-encoded LAZ point cloud

Delivered as: a file at {path}/output.copc.laz. {path} is the directory declared in the job's outputs (delivered names).


What it does internally ​

  1. Downloads the input from MinIO

  2. Checks whether the input is already COPC. It is, when all of these hold:

    • LAS 1.4 with a compressed point format;
    • the first VLR is the COPC info record (copc / record 1);
    • the file is not truncated (it extends past the end of the root hierarchy page);
    • PDAL's readers.copc can open it (header and hierarchy only, no points read).

    Anything else, including an error during the check, takes the rebuild path.

  3. Already COPC: the input file becomes the output unchanged (byte-identical). Otherwise: runs a PDAL pipeline with writers.copc (fixed scale scale_x/y/z = 0.001, auto offsets, 8 threads) — all points and attributes are preserved — and validates the result with a header and hierarchy read (pdal info --metadata). A non-zero exit or an empty output fails the step.

  4. Runs pdal info --metadata on the output (a header read) to capture metadata (bounding box, point count, CRS) into the artifact record

  5. Hashes the output, uploads it to MinIO and returns the artifact

Full per-dimension statistics are not part of this artifact's metadata; DATASET_INFO produces them.


Recipe usage ​

json
{
  "id": "build_copc",
  "type": "BUILD_COPC",
  "inputs":  { "input_las": "job:input_las" },
  "outputs": { "output_copc": "step:build_copc.output_copc" }
}

Artifact storage path ​

artifacts/job_{id}/build_copc/output.copc.laz

  • REPROJECT_LAS — already writes COPC; BUILD_COPC after it skips the rebuild
  • BUILD_EPT — EPT format, better for Cesium / large datasets
  • BUILD_POTREE — Potree tileset format, better for Potree-based viewers