Hi, all
I want to change the point cloud data stored in ASCII format using C ++ to the pnts binary format used by Cesium (http://cesiumjs.org).
I’m having difficulty in creating a binary format file using specification information because I do not have enough understanding about data types and binary files.
The specification of the pnts format and the attribute information of the header are shown in Figure 1 and 2.
Figure 1
Figure 2
Currently, I’m analyzing the header portion of the binary-formatted sample file (test.points) and the results are shown in Figure 3.
The contents of the pnts file were changed to hexadecimal notation using Notepad ++, and these values were converted to decimal digits and confirmed.
Figure 3
magic, version, and byteLength are interpreted correctly, but the remaining FeatureTableJSONByteLength, FeatureTableBinaryByteLength, batchTableJSONByteLength, and batchTableBinaryByteLength are much larger than I expected.
In the description of the header field above, I thought that the size of the byte buffer of FeatureTableJSONByteLength would not exceed the total byte length, but it was too large.
Please comment whether I misinterpreted it or if it was generated differently when creating the sample file, or if the approach was wrong when creating the file using the format specification.
Thank U
https://drive.google.com/file/d/0B4fUL_mhs4L3b2ZjTHZOTEM0NVU/view <- This is a pnts format.
I uploaded only one of several files.Thanks.
Thank you for answer.
The information you give me is still being watched.
While waiting for an answer, I made a pnts file myself and need to make sure it was created properly.
If there is a problem with the file, please let me know where the problem is.
(I uploaded the pnts file.)
I will wait for your reply again.
Thanks again for answer.
“The string generated from the JSON header should be padded with space characters in order to ensure that the binary body is byte-aligned“
I saw this sentence in Implementation Notes.
But, I do not know exactly what it means to consider padding (padded with space characters)
Can you give examples or explain in detail?
Thank you for your reply every time.
Currently,I am testing with the viewer included in this link.
( http://points.chicago.vision/ )
However, the pnts file created by me is not properly displayed in the viewer.
Perhaps there seems to be a problem with pnts.
I'm sorry, but I want you to check for any problems with pnts.
Thank you.
( This is the point cloud I want )
Thanks to your many answer, I have completed the pnts file using C++
Thank you very much.
Finally, I want to ask one more thing