Skip to content

Format: CC BIN (*.bin) (#37) - #89

Merged
mahach666 merged 4 commits into
mainfrom
feature/issue-37-cc-bin
Nov 18, 2026
Merged

mahach666 merged 4 commits into
mainfrom
feature/issue-37-cc-bin

Conversation

@mahach666

@mahach666 mahach666 commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Part of #37.

Summary

  • Add a managed reader for CCB2 point clouds through PclFile.Open.
  • Read XYZ, RGB or RGBA, intensity and supported metadata. Apply the stored matrix, then divide by the global scale and subtract the global shift.
  • Read scalar fields using their declared value counts and the lengths in their display metadata. Reject truncated headers, values and inter-field metadata.
  • Recognize Potree nodes that match the CCB2 probe and ignore unrelated files named cloud.js or metadata.json.

Layout evidence and limits

  • PRONOM fmt/1885 identifies the CCB2 signature. The Zenodo sample supplied observations of the supported entity and scalar layouts. The public coordinate formula defines undoing the shift and scale.
  • The reader uses little-endian 32-bit counts, big-endian byte counts for the UTF-16 names, 32-bit coordinates and matrix elements, and 64-bit global shift and scale.
  • Each supported scalar field supplies a 256-byte name, one flag byte, a 32-bit value count and that many 32-bit floating-point values. The inter-field display metadata can hold an optional palette with length-prefixed strings and a counted list of steps. Short intensity arrays yield missing intensity for the remaining points.
  • Normals remain outside the supported CCB2 subset. The published BIN layout page covers the older V1 format.

Verification

  • Local Release suite with the Zenodo fixture on .NET 8 and .NET 10. 1118 passed and 25 skipped on each target.
  • The Zenodo file passed the real-file test and a complete streaming check on both targets. The reader produced four scans and 2,053,097 points with finite coordinates, colour and intensity.
  • Regression tests cover variable scalar metadata, a truncated scalar field count, subnormal scale with and without a matrix, and Potree detection with unrelated manifest files.

@mahach666
mahach666 merged commit 1833882 into main Nov 18, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant