I want to classify ground points from multiple LiDAR tiles (.las files) using MCC-LIDAR software.

I already made some research and I have found this sourceforge thread; however, it is not that clear (I am not a programmer).

Any ideas how to batch process multiple files with MCC-LIDAR?


1 Answer 1


Suppose the following:

  • MCC-LIDAR software is installed in C:\Program Files (x86).
  • Input .las files are stored in C:\test\input.
  • Outputs (also with extension .las) are going to be stored in C:\test\output.

The first alternative is an improved version from K.B's code from your sourceforge link:

PATH="C:\Program Files (x86)\MCC-LIDAR 2.1\bin";%PATH%
FOR %%W IN (C:\test\input\*.las) DO (
mcc-lidar %%W C:\test\output\%%~NXW -s 0.5 -t 0.07

Here is a brief explanation:

PATH="C:\Program Files (x86)\MCC-LIDAR 2.1\bin";%PATH%

Maps the MCC-LiDAR software in the system's account Environment Variables, so the mcc-lidar.exe program can be recognized.

FOR %%W IN (C:\test\input\*.las) DO (

Do something with all (*) .las files in C:\test\input\. Since it is a for loop 'something' is done file by file.

mcc-lidar %%W C:\test\output\%%~NXW -s 0.5 -t 0.07

At each step in the loop, apply the mcc-lidar.exe tool to a .las file and save it with the same name in folder C:\test\output\. What makes it to be saved with the same name are the modifiers ~NX (~Name and ~eXtension, respectively) appended to variable %%W. For example %%W is C:\test\input\data1.las and %%~NXW is data1.las.


The parenthesis closes the loop and PAUSE keeps the prompt window opened, so one can read all that was gone through.

Another alternative, can be used when one has some sort of index number in the input filename. For example: data1.las, data2.las, ..., data6.las, etc.

Then, use the following code:

PATH="C:\Program Files (x86)\MCC-LIDAR 2.1\bin";%PATH%
FOR /L %%W IN (1,1,6) DO (
mcc-lidar C:\test\input\data%%W.las C:\test\output\data%%W.las -s 0.5 -t 0.07

The code explanation is in Clipping LAS data with multiple shapefiles.

If your final goal is to build a DEM, then take a look at a related post:

Determining bare earth DEM from unclassified LAS file?

  • Thankyou very much, It is working as you mention!! Again Thanks for your time! Commented Nov 27, 2017 at 14:45
  • Hi Andre, I wonder how can I give you credit for this. I am working a region about 134 sq. km and the bat file has been truly helpful. Since it will be used for academic purposes I think you deserve part of the credit. Saludos Gerardo Commented Mar 12, 2018 at 16:30
  • @GerardoJimenez, really glad this post was useful to you. Because the nice thing here in GIS SE is that we learn from each other. My answer is built on other’s contributions as well, so if you want to thank you can upvote (besides accepting) the answers which were helpful to you. Regarding the academic work, I think you can give credit by citing/referencing this post in yout text, if you want to. Best. Commented Mar 12, 2018 at 18:08
  • I just have some maps I want to show you...how can I do it...for me it is very important your opinion Commented Apr 10, 2018 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.