SBF
Jump to navigation
Jump to search
Introduction
The SBF (Simple Binary File) format, is meant to ease the export and external processing of big point clouds.
While the BIN format of CloudCompare can store about anything created or loaded in CloudCompare, it is complex to decode (as it is a serialized stream of what is loaded in the memory - the only way to properly open a BIN file is to use QCC_DB_LIB).
Thus, the SBF format has been created to store data in a Binary file with a very simple structure, and to store some more meta-data in a text file next to the binary file.
Specifications
Binary file
Header
Total length: 64 bytes
Bytes | Description | Value / comment |
---|---|---|
0-1 | SBF header flag | 42 42 |
2-9 | Point count (Np) | 8 bytes unsigned integer |
10-11 | Scalar field count (Ns) | 2 bytes unsigned integer |
12-19 | X coordinate shift (should be added to all 32bit coordinates stored in the file) | 64bit floating point value ('double') |
20-27 | Y coordinate shift (should be added to all 32bit coordinates stored in the file) | 64bit floating point value ('double') |
28-35 | Z coordinate shift (should be added to all 32bit coordinates stored in the file) | 64bit floating point value ('double') |
36-63 | Reserved for later | 0 |
Body
All values are saved with 32bit floating point precision (= 'float').
For each point (1-Np):
Bytes | Description | Value / comment |
---|---|---|
0-3 | X coordinate | 32bit floating point value ('float') |
4-7 | Y coordinate | 32bit floating point value ('float') |
8-11 | Z coordinate | 32bit floating point value ('float') |
12-15 | Scalar value (SF #1) | 32bit floating point value ('float') |
16-19 | Scalar value (SF #2) | 32bit floating point value ('float') |
... | ... | |
12-15 + k * 4 (k in [0 ; Ns[) | Scalar value (SF #k) | 32bit floating point value ('float') |