Page 1 of 1

Open and export LAZ with BATCH not working

Posted: Sat Aug 29, 2020 9:01 am
by ArnaudF
Hello all,

I'm creating a batch that allowed me to open laz file(s) by drag/drop , subsample the cloud, then export it in LAZ.
But when i try to execute the following line, none file is output...

Code: Select all

for %%f in (%*) DO "D:\Program Files\CloudCompare\cloudcompare.exe" -SILENT -O -GLOBAL_SHIFT AUTO %%f -C_EXPORT_FMT LAZ -NO_TIMESTAMP -SS SPATIAL 1.00 
The error return to my batch is the following "Unhandled format specifier (LAZ)"
Image

Surprisingly if I chose to export in LAS by modifying

Code: Select all

-C_EXPORT_FMT LAZ
to

Code: Select all

-C_EXPORT_FMT LAS
, then it work and I have from my input file "test.laZ" an output file "test_subsample.laS". It work also with .bin .e57 etc...
I'm wonderring why can't I export my file in LAZ ? Can't we export in the same format as the input?

Regard,

Arnaud

**********************************************
Update :

Ok after doing some research i've found the problem on https://www.cloudcompare.org/doc/wiki/i ... _line_mode :
"Specifies the default output format for clouds. Format can be one of the following: ASC, BIN, PLY, LAS, E57, VTK, PCD, SOI, PN, PV."
So I see that laz isn't in the list...

Is it possible for a futur version of Cloudcompare to add the LAZ writer ? It will be very usefull !

Re: Open and export LAZ with BATCH not working

Posted: Sat Aug 29, 2020 4:34 pm
by daniel
Actually I would have expected LAZ to work!

On which OS are you working? Windows?

Re: Open and export LAZ with BATCH not working

Posted: Mon Sep 02, 2024 3:52 pm
by juacarri
I rescued this post because I'm finding the same error with windows. I am not able to export a .laz point cloud using the command line.

Re: Open and export LAZ with BATCH not working

Posted: Tue Sep 03, 2024 11:58 am
by daniel
With which version?

Re: Open and export LAZ with BATCH not working

Posted: Mon Sep 23, 2024 4:23 pm
by juacarri
daniel wrote: Tue Sep 03, 2024 11:58 am With which version?
My apologies for the late reply.
I have tested with the versions 2.12.0, 2.12.4 (Kyiv) and 2.13.2 (Kharkiv), finding the same issue with this code:

Code: Select all

for %%F in ("%DIRECTORIO%\*.laz") do (
    set "ARCHIVO=%%~nF"

    CloudCompare -SILENT -C_EXPORT_FMT LAZ -AUTO_SAVE OFF -O "%%F" ^
                 -OCTREE_NORMALS %RADIO% ^
                 -NORMALS_TO_SFS ^
                 -DENSITY %RADIO% -TYPE KNN ^
                 -SAVE_CLOUDS FILE "%DIRECTORIO%\%%~nF_Vars.laz"
   
)
Returning the following error:

Code: Select all

[10:45:32] [CHANGE CLOUD OUTPUT FORMAT]
[10:45:32] Unhandled format specifier (LAZ)
[10:45:32] [CHANGE CLOUD OUTPUT FORMAT] finished in 0.00 s.
[10:45:32] Processed finished in 0.00 s.

Re: Open and export LAZ with BATCH not working

Posted: Sun Sep 29, 2024 2:59 pm
by daniel
Ok, so looking at the code I realized that in the previous versions, you had to choose the 'LAS' filter, but then use the '-SAVE_CLOUDS FILE XXX.LAZ' command to explicitly save it as a LAZ file...

I have changed that in the latest 2.14.alpha version (online). You can now directly choose 'LAZ' as export format (and you don't need to force the output filename). This makes more sense.