Command Line M3C2 Invalid parameter: 1 file names, 3 clouds

Feel free to ask any question here
Post Reply
mtmaclay
Posts: 4
Joined: Thu Jan 04, 2024 11:10 pm

Command Line M3C2 Invalid parameter: 1 file names, 3 clouds

Post by mtmaclay »

Hi Daniel,

I'm attempting to run m3c2 via the command line and specify the output path of the results of the calculation. Unfortunately I get an error message: "Invalid parameter: specified 1 file names,but there are 3 clouds" that I'm specifying three clouds with only one parameter file. I see in another ticket that this can be caused by an issue with spaces in filepaths, but I don't have any spaces. I wonder if there are additional characters. I'm on macOS apple silicon M1, and I've tried using CC 2.12.3 (latest stable) and CC 2.13.3 (beta). The Beta version is unable to read in the .las files (problem with the third party plugin opening the file). It's quite possible there is an issue with my syntax too :). Here is my terminal command:

open -a CloudCompare.app --args -clear -auto_save off -c_export_fmt bin \
-o -global_shift -475000 -3641000 0 \
'/path/to/dataset/xyz_canupo_noveg.las' \
-o -global_shift -475000 -3641000 0 \
'/path/to/dataset/abc_canupo_noveg.las' \
-m3c2 '/path/to/parameters/m3c2_params.txt' \
-save_clouds file '/path/to/m3c2_results/xyz_abc_results.bin'

I am able to use the params file in the GUI mode of m3c2.

let me know if you have any ideas! Thanks so much!
daniel
Site Admin
Posts: 7383
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command Line M3C2 Invalid parameter: 1 file names, 3 clouds

Post by daniel »

Is the beta version the one from Paul Rascle? (https://www.simulation.openfields.fr/in ... -downloads). If yes, it would be important to tell him so that he can try to fix the issue).

Else, I'm not an expert with the command line on macOS. Can you maybe post the exact messages/errors output by CloudCompare?
Daniel, CloudCompare admin
HeadLess
Posts: 53
Joined: Mon Mar 25, 2019 9:27 pm

Re: Command Line M3C2 Invalid parameter: 1 file names, 3 clouds

Post by HeadLess »

What is the whole output?

But i think your issue is with the -SAVE_CLOUDS -FILE
Use only filenames not full path and don't use spaces there.

Or at least try to use double quotes inside that option like below

-SAVE_CLOUDS -FILE "'first file name' 'second file name'"
mtmaclay
Posts: 4
Joined: Thu Jan 04, 2024 11:10 pm

Re: Command Line M3C2 Invalid parameter: 1 file names, 3 clouds

Post by mtmaclay »

daniel wrote: Fri Jan 05, 2024 12:30 pm Is the beta version the one from Paul Rascle? (https://www.simulation.openfields.fr/in ... -downloads). If yes, it would be important to tell him so that he can try to fix the issue).
Yes, it is that Beta version. In my brief debugging attempt it seemed that it is a path formatting issue, where the opening process splits the complete filepath passed by the user and appends an extra separator '/' before the filename, so files are unable to be found. Will you pass this along to Paul Rascle or should I file a bug somewhere?
HeadLess wrote: Fri Jan 05, 2024 1:52 pm But i think your issue is with the -SAVE_CLOUDS -FILE
Use only filenames not full path and don't use spaces there.

Or at least try to use double quotes inside that option like below

-SAVE_CLOUDS -FILE "'first file name' 'second file name'"
You are right that it's the save file parameter! I was only writing to one file... so I didn't account for the fact that Three files are open and need to be saved to separate paths *facepalm*. Thanks for helping me understand this, and that the error was not referring to the cloud paths or the M3C2 params file!

This issue seems to resolved for now. Thanks, all!
Post Reply