Page 1 of 1

risky behaviour of CLI hwen using -FEATURE

Posted: Thu Dec 14, 2023 3:10 pm
by PablerasBCN
Hello

I've noticed a never before seen behaviour at the time of saving when using CLI. I canĀ“t tell right now if I had never used -feat before, yet I would say I doubt.

The thing is that I was not seeing any file output, and when reading command line I noticed:

[SAVING]
[LAS] scalar field Eigenentropy (0.132) will be saved automatically in the extra fields of the output file
[I/O] File 'E:**************/08OE2704_temp.las' saved successfully
Processed finished in 305.32 s.

So I opened and I confirmed it was overwriting files.

THANKFULLY.

theese files had already the SF removed because are the output files of a .bin, but could have been cathastrophic.

I've been few months without using CLI, but I would say, that even without timestamp, which I allways remove, there was extra info added to the name, like the commands used and may be values, but not this time.

The very least would be at the launch of the bat to be warned that files will be overwritten.

my .bat file looks like:

for %%f in (E:\************\02_VegetationOnly_ColorFixed\*.las) DO "C:\Program Files\CloudCompare\cloudcompare.exe" -SILENT -O -GLOBAL_SHIFT AUTO %%f -AUTO_SAVE OFF -C_EXPORT_FMT LAS -NO_TIMESTAMP -REMOVE_ALL_SFS -FEATURE EIGENTROPY 0.132 -SAVE_CLOUDS

Re: risky behaviour of CLI hwen using -FEATURE

Posted: Thu Dec 14, 2023 5:06 pm
by PablerasBCN
So I did a test just in case this issue was not specific to -Feature command but to other commands.

tested both with timestamp and without, and seems to be working nicely by outputing renamed files, not overwritting.

This time I did filter a scalar field and perform a duplicate removal.

the file output naming being like "08OE1794_temp_FILTERED_[0_0.05]_REMOVED_DUPLICATE_POINTS" where input was "08OE1794_temp".

So. I would request the -FEATURE command to work in a similar fashin, writting into the name the computed faature, and may be scale.

Re: risky behaviour of CLI hwen using -FEATURE

Posted: Fri Dec 15, 2023 8:57 am
by HeadLess
I've did a PR to CloudCompare git it should fix your problem as soon as it's merged, and built.

https://github.com/CloudCompare/CloudCompare/pull/1913

Re: risky behaviour of CLI hwen using -FEATURE

Posted: Fri Dec 15, 2023 5:46 pm
by PablerasBCN
Thank you so much. I'm sure this will save someone from data loss in the future :D

Re: risky behaviour of CLI hwen using -FEATURE

Posted: Sat Dec 16, 2023 11:31 am
by daniel
Yes this is now merged. Thanks @HeadLess.

I'll updated the 2.13.beta version later during the week-end.