I am trying to use the python console to batch quite a few processes from lastools. I'm having trouble with the arguments to lasclip.

clipped_las = processing.runalg('lidartools:lasclip', True, flight_las, clipper, False, 0, 0, outputname)

is complaining:

Wrong number of parameters 
. . . 
OPERATION(what to do with points)
     0 - clip
     1 - classify

But I told it to "0" (in the 5th argument) i.e., clip.

I guess I don't understand what ParameterSelection, the type (?) associated with OPERATION is. I don't want to make this a tool with parameters, just want to run it once with the parameters specified in the code.

What ought to go in that 5th spot?

2 Answers 2


I have not yet used LAStools in QGIS via a Python command line (only via the toolbox). Maybe create the same query via the toolbox and then look at the log output to see how to correctly formulate the Python command line? Or come to the International QGIS Workshop and Conference on May 25/26 in Girona, Spain (near Barcelona) and we figure it out together ... (-:


If you run a processing algorithm in QGIS, it will be logged in the processing history. Go to the menu Processing > History and find the algorithm. If you click it, the command line used to start the algorithm will show up in the bottom part of the window.

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.