npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@voxelkloud/format-copc

v0.5.2

Published

The COPC driver for voxelkloud: one LAS 1.4 file, laszip chunks arranged as an octree, hierarchy pages in an EVLR — streamed by HTTP Range with no conversion step.

Downloads

859

Readme

@voxelkloud/format-copc

The COPC driver for voxelkloud.

npm install @voxelkloud/format-copc
import { copcFormat } from "@voxelkloud/format-copc";
import { formats, loadPointCloud } from "@voxelkloud/loader";

formats.register(copcFormat);

const { source, tree, openPoints } = await loadPointCloud(
  "https://cdn.example/survey.copc.laz",
);
view.addCloud(source, tree, openPoints);

NOT registered by default. That is a bundle decision, not a judgement: this driver pulls in a wasm LAZ decoder, and an app that only reads Potree should not carry 148 KB of it to find that out.

What it is

One file, one HTTP host, no conversion step. A COPC file is a LAS 1.4 file whose point records are laszip chunks arranged as an octree, with the hierarchy in an EVLR at the end. Everything this driver does is a byte range into that one URL:

  • one ranged read of the first 8 KiB identifies the file and describes it completely — the LAS header, the copc info VLR, the laszip VLR and the Extra Bytes descriptor all live there by spec. A 2.7 MB file costs 8 KiB to open.
  • one read per hierarchy page. An entry with a point count of -1 is a reference to another page; the tree fetches them as the camera descends.
  • one read per node. A COPC node IS a bare laszip chunk — no chunk table in front of it, no header, and the point count comes from the hierarchy rather than the bytes. That is exactly the shape LazChunkDecoder takes.

The host must honour Range. A server that answers 200 with the whole file is accepted and sliced, because a small COPC file works that way and refusing it would be pedantry; a 200 that does not even cover the requested range is not recoverable and says so.

What it is not

The octree is @voxelkloud/core's createPagedOctree — Potree v2, COPC and EPT all deliver a hierarchy in pages with references to further pages, and that engine is shared. The LAS record is @voxelkloud/format-las's. The laszip decode is @voxelkloud/wasm-codecs's. What is here is what is genuinely COPC: the 160-byte info VLR, the 32-byte hierarchy entry, and the -1 that means "continued elsewhere".

Attribute names

"position", "rgb", "intensity", "classification", "gps-time", "return number" — PotreeConverter's names for the same LAS fields, on purpose. A colour mode that keys off "classification" has to work on a COPC cloud and a Potree cloud without the renderer knowing which it got. The bit-packed LAS fields come apart into separate attributes, as they do in a Potree manifest, and Extra Bytes dimensions keep their declared names.

gps-time's domain comes from the info VLR, which is the only thing in a LAS file that declares it — without it the float32 lane normalises against a range of zero and every point decodes to 0.

Testing

Against demo/potree/pointclouds/lion_takanawa.copc.laz, which came out of untwine. A hand-built COPC fixture would be this driver's own idea of the format checked against itself; the real file is the only oracle worth having. It is gitignored, and the suite skips itself when it is absent.

The check that matters: every node's own point count, summed across the whole hierarchy, equals the header's. A hierarchy read one entry short does not add up.

MIT.