Open and export LAZ with BATCH not working

Feel free to ask any question here
Post Reply
ArnaudF
Posts: 2
Joined: Thu Jul 11, 2019 9:59 am

Open and export LAZ with BATCH not working

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

Re: Open and export LAZ with BATCH not working

Post by daniel »

Actually I would have expected LAZ to work!

On which OS are you working? Windows?
Daniel, CloudCompare admin
juacarri
Posts: 16
Joined: Tue Oct 08, 2019 7:55 am

Re: Open and export LAZ with BATCH not working

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

Re: Open and export LAZ with BATCH not working

Post by daniel »

With which version?
Daniel, CloudCompare admin
juacarri
Posts: 16
Joined: Tue Oct 08, 2019 7:55 am

Re: Open and export LAZ with BATCH not working

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

Re: Open and export LAZ with BATCH not working

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