Thank you very much for the data, they have allowed me to have a much clearer idea of the problem and to check the validity or not of my proposal (although unfortunately this week I have "quite a few pending issues" and maybe I would need a little more adjustment in some parameters). I hope you find my proposal useful.
My proposal to try to automate everything would be the following:
1) Apply a
LASthin to get the lowest point according to a given low-resolution grid. I have done some tests (I would have needed maybe some more) with 20m it works fine, 10m is too small. The selected points are assigned to class 8.
The command would be:
lasthin -cpu64 -i <your_input_file> -step 20 -lowest -classify_as 8 -odir <your_output_directory> -odix "_th20" -olaz.
2) In this case it has little effect because the terrain is quite regular, but it is advisable to analyze which of the selected points (Class 8) actually belong to the Ground class using
LASground_new. In this case, it has no effect, but perhaps in other areas, it does. I have employed the Custom strategy, customizing the spikes parameter to 0.25.
The command would be:
lasground_new -cpu64 -i <your file result of task1> -ignore_class 0 -spike 0.25 -down_spike 0.25 -ultra_fine -compute_height -odir <your output directory> -odix "_gr" -olaz.
3) Once we have a "good" approximation of what would be the surface of our terrain. We try to "recover" the points that are part of it, according to the distance they have with respect to the initial surface. This is done by
LASheight including tolerance of -0.1 to +0.1 for the point to be considered as Class 2 (Ground). Of course, these parameters would need a little more fine-tuning. As you can see in the UnclassPoints1_th20_gr_height.laz file they more or less match your own polygons in the crop corridors.
The command would be:
lasheight -cpu64 -i <your file result of task2> -classify_between -0.1 0.1 0.1 2 -odir <your output directory> -odix "_height" -olaz.
Perhaps the problem will be the final configuration for the digital terrain model calculation. It is evident that many points are "lost" and the geometry of the points is distributed almost at the level of the corridors in the crops, making it difficult to use a conventional triangulation. Perhaps a possible solution will be to use LASgrid and then "fill in the gaps". If you want tomorrow I could try to go a little deeper into this, as long as the first part you consider fits your needs.
Best regards,
Jorge Delgado
University of Jaén