How to save the cloud with Global Shift (Scale).

Feel free to ask any question here
Post Reply
aquariumbg
Posts: 3
Joined: Fri Nov 10, 2017 7:19 am

How to save the cloud with Global Shift (Scale).

Post by aquariumbg »

First of all, I am impressed from this software - so many unique possibilities.
I am using it only 3 days and I have an issue. I tried to find the answer in the forum, but without success.
The problem:
I have PTX files with big coordinates – let say 630 000 m in X direction. I want to scale the whole cloud to 630.000. I am importing the PTX file in cloud compare and then Edit --> Global shift with scale 0.001. All works perfect.

Now I want to export the scaled cloud in format, which is possible to import to LFM Server (E57).
Export is OK but when I import the E57 file back in cloudcompare the coordinates are no scaled.
IF I export the cloud in BIN format and import back, coordinates are CORRECT!?

Unfortunately, I can use only PTX, PTZ, ASTME57 and FLS formats.
Where I am wrong? Probably this is not the correct workflow. Thank you in advance.
daniel
Site Admin
Posts: 7712
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: How to save the cloud with Global Shift (Scale).

Post by daniel »

Indeed, BIN files are storing the current 'project' (or at least the highlighted elements) and everything should stay consistent in CloudCompare when you reload them.

When exporting to E57, the Global Shift and Scale will be simply 'reverted' and things may not stay consistent. Well, in the general case it should (if you use a recent version of CC, and stick to the default process), but I can imagine some tricky cases where the scale is not applied where you would expect it, for instance if you set the Global Scale after loading a file with a Global Shift already applied.

So the right workflow should be:
- use the latest version of CC (2.9.1)
- load the cloud with the 'Global Shift' translation as suggested by CloudCompare
- use the 'Edit > Multiply / Scale' method (http://www.cloudcompare.org/doc/wiki/in ... iply/Scale)
- make sure the 'Rescale Global shift' option is checked
- export to E57

I hope it works. Otherwise don't hesitate to post a new message or send me a message directly (cloudcompare [at] danielgm.net).
Daniel, CloudCompare admin
aquariumbg
Posts: 3
Joined: Fri Nov 10, 2017 7:19 am

Re: How to save the cloud with Global Shift (Scale).

Post by aquariumbg »

I will check this as soon as possible and I will post the result here.
Thank you for the quick answer.

Yes, the scale is applied AFTER loading the file, because there is a bug ( at least on my computer) – the Global shift window appear for a few seconds and then Cloudcompare starts to import the PTX file without to wait for my answer (I am using the last version of the program, Win10 x64t). So I just agree with the proposal of the program (quick) and then applying the Global Scale shift.
daniel
Site Admin
Posts: 7712
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: How to save the cloud with Global Shift (Scale).

Post by daniel »

Hum, I'm not sure I ever encountered a PTX file with large coordinates, but the 'dialog closing itself' issue is a bit weird (as it should work the same as with the other formats). Don't you have an issue with your keyboard ? :D.

By the way do you load the file via the 'File > load' menu, or by dragging it on the 3D view?
Daniel, CloudCompare admin
aquariumbg
Posts: 3
Joined: Fri Nov 10, 2017 7:19 am

Re: How to save the cloud with Global Shift (Scale).

Post by aquariumbg »

Your method to export the cloud with changed coordinates WORKS!
Thank you. I will try tomorrow to import the E57 file in LFM server.

The big exist, my keyboard is OK :) But this is not a big problem, i am quick enough :)
Thank you again for the perfect program.
juacarri
Posts: 16
Joined: Tue Oct 08, 2019 7:55 am

Re: How to save the cloud with Global Shift (Scale).

Post by juacarri »

daniel wrote: Fri Nov 10, 2017 8:53 am Indeed, BIN files are storing the current 'project' (or at least the highlighted elements) and everything should stay consistent in CloudCompare when you reload them.

When exporting to E57, the Global Shift and Scale will be simply 'reverted' and things may not stay consistent. Well, in the general case it should (if you use a recent version of CC, and stick to the default process), but I can imagine some tricky cases where the scale is not applied where you would expect it, for instance if you set the Global Scale after loading a file with a Global Shift already applied.

So the right workflow should be:
- use the latest version of CC (2.9.1)
- load the cloud with the 'Global Shift' translation as suggested by CloudCompare
- use the 'Edit > Multiply / Scale' method (http://www.cloudcompare.org/doc/wiki/in ... iply/Scale)
- make sure the 'Rescale Global shift' option is checked
- export to E57

I hope it works. Otherwise don't hesitate to post a new message or send me a message directly (cloudcompare [at] danielgm.net).
Daniel, could you let me know if there is something similar to be applied via command line? I want to open a .Las file and save the cloud with the coordinates shifted.
juacarri
Posts: 16
Joined: Tue Oct 08, 2019 7:55 am

Re: How to save the cloud with Global Shift (Scale).

Post by juacarri »

juacarri wrote: Wed Jun 09, 2021 11:29 am
daniel wrote: Fri Nov 10, 2017 8:53 am Indeed, BIN files are storing the current 'project' (or at least the highlighted elements) and everything should stay consistent in CloudCompare when you reload them.

When exporting to E57, the Global Shift and Scale will be simply 'reverted' and things may not stay consistent. Well, in the general case it should (if you use a recent version of CC, and stick to the default process), but I can imagine some tricky cases where the scale is not applied where you would expect it, for instance if you set the Global Scale after loading a file with a Global Shift already applied.

So the right workflow should be:
- use the latest version of CC (2.9.1)
- load the cloud with the 'Global Shift' translation as suggested by CloudCompare
- use the 'Edit > Multiply / Scale' method (http://www.cloudcompare.org/doc/wiki/in ... iply/Scale)
- make sure the 'Rescale Global shift' option is checked
- export to E57

I hope it works. Otherwise don't hesitate to post a new message or send me a message directly (cloudcompare [at] danielgm.net).
Daniel, could you let me know if there is something similar to be applied via command line? I want to open a .Las file and save the cloud with the coordinates shifted.
I was sure that Daniel thought in this before. In order to preserve the global shift, it should be used the command "-DROP_GLOBAL_SHIFT". Following you can find an example of usage in a folder which contains hundred of .Las files:

Code: Select all

for %%f in (*.las) DO CloudCompare -SILENT -C_EXPORT_FMT LAS -o -GLOBAL_SHIFT AUTO %%f -DROP_GLOBAL_SHIFT -NO_TIMESTAMP -SAVE_CLOUDS 
daniel
Site Admin
Posts: 7712
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: How to save the cloud with Global Shift (Scale).

Post by daniel »

Yes, exactly ;)
Daniel, CloudCompare admin
Post Reply