CloudCompare -SILENT -C_EXPORT_FMT LAS -AUTO_SAVE OFF -O PNOA_2023_EXT_274-4420_NPC00.laz -OCTREE_NORMALS 1 -NORMALS_TO_SFS -SET_GLOBAL_SHIFT -KEEP_ORIG_FIXED -SAVE_CLOUDS FILE 2023_EXT_274-4420_NPC00_v2.laz
But it returns me the error “[14:58:12] Invalid parameter: X coordinate of the global shift vector after ‘GLOBAL_SHIFT’”, does anyone know how to use this function correctly?
Thanks in advance!
daniel wrote: ↑Wed Oct 16, 2024 9:06 pm
According to the documentation, you still have to set the x, y and z coordinates of the custom shift (between -SET_GLOBAL_SHIFT and -KEEP_ORIG_FIXED).
This reply indicates that the function does not behave as I intended. My goal is to preserve the offset of the original file in the resulting file, i.e., to select the option shown in the attachment.
With this code, my aim is to save a file identical to the original but with the normals added as a scalar field. How can I do it?
I believe in most cases the -O -GLOBAL_SHIFT AUTO should work as you expect. The only exception is if the original LAS offset was already not sufficient to preserve the accuracy... which would be a bummer.
The -SET_GLOBAL_SHIFT option should only be used if you want to override the Global Shift information later.
And if you do it wit the GUI version, is the default Global Shift equal to the original LAS offset or something else?
Looking again at the values in your screen capture, it seems that the automatically generated offset is 10^5 smaller. I guess CC estimates it's too large to maintain accuracy. Once again in the GUI version you could change the threshold (with 'File > Global shift settings'). But you cannot do that with the command line version. It would be easy to add though. Or add an option to explicitly force the use of the LAS offset maybe.
And if you can share the file with me, don't hesitate to send it to me (admin@cloudcompare.org)