Page 1 of 1

Using the option "-KEEP_ORIG_FIXED" in the commandline

Posted: Wed Oct 16, 2024 1:09 pm
by juacarri
Hi! I am trying to use the “-KEEP_ORIG_FIXED” option with the version v2.14.alpha (OCt 14 2024) , using the following line of code:

Code: Select all

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!

Re: Using the option "-KEEP_ORIG_FIXED" in the commandline

Posted: Wed Oct 16, 2024 9:06 pm
by daniel
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).

Re: Using the option "-KEEP_ORIG_FIXED" in the commandline

Posted: Thu Oct 17, 2024 4:13 pm
by juacarri
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?

Thank you very much for your response, Daniel.

Re: Using the option "-KEEP_ORIG_FIXED" in the commandline

Posted: Sat Oct 19, 2024 6:26 am
by daniel
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.

Re: Using the option "-KEEP_ORIG_FIXED" in the commandline

Posted: Sat Oct 19, 2024 8:16 am
by juacarri
With the option that you indicate to me, the offset in the metadata is still changed. These are the original metadata:
1.png
1.png (16.76 KiB) Viewed 686 times
And these after calculating the normals:
2.png
2.png (16.01 KiB) Viewed 686 times

Re: Using the option "-KEEP_ORIG_FIXED" in the commandline

Posted: Thu Oct 24, 2024 9:18 am
by daniel
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)