Using the option "-KEEP_ORIG_FIXED" in the commandline

If you are allergic to bug trackers, you can post here any remarks, issues and potential bugs you encounter
Post Reply
juacarri
Posts: 16
Joined: Tue Oct 08, 2019 7:55 am

Using the option "-KEEP_ORIG_FIXED" in the commandline

Post 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!
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

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

Post 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).
Daniel, CloudCompare admin
juacarri
Posts: 16
Joined: Tue Oct 08, 2019 7:55 am

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

Post 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.
Attachments
Capture.PNG
Capture.PNG (11.11 KiB) Viewed 832 times
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

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

Post 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.
Daniel, CloudCompare admin
juacarri
Posts: 16
Joined: Tue Oct 08, 2019 7:55 am

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

Post 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 771 times
And these after calculating the normals:
2.png
2.png (16.01 KiB) Viewed 771 times
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

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

Post 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)
Daniel, CloudCompare admin
Post Reply