[GIS] Converting LiDAR files from LAZ to LAS format

convertlaslasziplazlidar

I'm trying to convert LiDAR files from the LAZ format (the compressed version) into LAS (the uncompressed version) using LASzip software.

However, I am not really sure how it works. I created a new output folder as I entered in the app interface, but it is totally empty.

I also had tried the following code in the command prompt window:

 D:\LiDAR\Laszip\laszip.exe *.laz 

and got a message saying 'no input specified'.

In my folder, there are about 100-ish.laz files as well as one imu.laz. Any suggestions?

Best Answer

For running LASzip from the command prompt window it is also necessary to specify the path of the input file.

For example, suppose the laszip.exe file is installed under the drive D: (D:\LASzip\laszip.exe) and that the .laz files are stored in D:\lidar.

Then, type:

D:\LASzip\laszip D:\lidar\*.laz

It will decompress all LAZ files in the current folder overwriting any existing file. The output files will have same name as the input files (but with extension .las).

Some remarks:

  • it is not necessary to type the file extension '.exe' in the command-line.
  • one can also use the identifier -i for input parameter, but it is optional: D:\LASzip\laszip -i D:\lidar\*.laz.
  • the identifier -odir can be used to specify a different output folder: D:\LASzip\laszip -i D:\lidar\*.laz -odir D:\lidar\output. It will save all .laz files with the same file names (except for .las extension) in the specified output folder. See Saving LAZ files to different location from input (LAS) files?.
  • use the identifier -odix to append to output file names: D:\LASzip\laszip -i D:\lidar\*.laz -odir D:\lidar\output -odix _decompressed. It means if the input file name is point_cloud_27.laz, the output file name will be point_cloud_27_decompressed.las.

See more examples here.

Another option (in relation to first example) is to proceed as suggested by Barbarossa, i.e., open the cmd from the input file folder and write the command as in your first attempt.

REM move to folder where the input file is, then run laszip.
cd  D:\lidar
D:\LASzip\laszip *.laz

If you want to call laszip directly from any folder without specifying the program path, then, berniejconnors's answer gives a good hint to add it in the environment variables (see here).

laszip D:\lidar\*.laz 

All examples here work the other way around, i.e., converting from .las files to .laz.