 Hello, welcome back on my YouTube channel. In this video I'm going to explain how to use PDAL-Wrench to process point clouds from the command line in an easy way. You might have observed in the previous videos on point cloud processing QGIS that every time when I executed the point cloud processing tool, it also shows the wrench command in the log. The arguments from the dialog are parsed to this command and then executed. The PDAL-Wrench repository on GitHub has a readme file with more information about PDAL-Wrench. It explains how to build it from source code and how to use the most common commands and their arguments. In this video we are going to try a few commands. In this example I'm going to create a digital surface model in raster format for the center of Delft derived from five point cloud last styles downloaded from geotiles.nl. The steps that I'm going to follow is to create a virtual point cloud layer from the last styles. Then I'm going to clip these last styles to the boundary polygon of the center of Delft that I've digitized, that's the red line. And next I'm going to interpolate the point cloud for that part of Delft using triangulation. To use the command line I can open a terminal in an easy way by right clicking on a folder in the browser panel and choosing open in terminal. Let's see which files are in this folder and there I see the last styles and the boundary polygon. Let's try to use PDAL-Wrench here. Unfortunately, it doesn't recognize the command. The command is not included in the path and that's probably because it might cause DLL conflicts. So we need to give the full path to the command in order to use it. For Windows installation the PDAL-Wrench.exe file is located in your osdo4w folder. You can use tap completion and under apps you join us. And when you execute PDAL-Wrench.exe from there you can see that it works, it gives you the available commands. To make it easier to use PDAL-Wrench and not write the full path I'm going to create a batch file that I can also reuse later. I create it by using copycon PDAL-Wrench.bat and then I write this whole path to PDAL-Wrench.exe and copy it with right click I can paste it here. I add a space and then percentage star which means it can take arguments that are given after PDAL-Wrench.bat. Then I press enter and control Z and then again enter and now the file is saved. Now let's use our first command to create a virtual point cloud from the tiles. So I use PDAL-Wrench which will use the batch file that I just created, the buildvpc command and it needs as a first argument the output file name. I'll call it delft.vpc and then I add the last tiles that need to be merged into that virtual point cloud. You can also provide a text file with the file names. After completing the command I press enter and it creates the virtual point cloud. The next step is to clip this vpc with our merge tiles to the boundary polygon and I'm going to use the PDAL-Wrench clip command with as an input delft.vpc that we've created in the previous step. Then the argument polygon equals boundary.shp for the shapefile but you can also use a geo package layer here and I define the output name and I'm creating again a virtual point cloud with the name delft-center.vpc. The advantage here of the virtual point clouds is that I'm not creating a lot of new huge layers on my hard disk but just virtual point cloud files which are much smaller and the final step is to interpolate this result to a raster using triangulation. So I'm going to use here the PDAL-Wrench to raster thin command as an output file name I give delft-dsm for digital surface model.tiff. As resolution in this demonstration I choose one meter and specify the amount of threads to be used on my computer and I choose here 16 threads and as an input I use delft-center.vpc Then I execute the command by pressing enter and this will take some time. Let's check the result in QGIS. I drag delft-dsm.tiff to the map canvas and there it shows up. With single bump pseudo color I can change the RAM. Now it would also be very nice to have the center of delft available as a point cloud just clipped to the center and back in the terminal I'm going to use the command PDAL-Wrench merge which makes not a virtual point cloud but a last file from the different tiles. So I merge the tiles together and I call the output delft.last and I add all the input tiles and I press enter to execute and that takes some time. The next step is to clip this last file to the boundary polygon and there I use again the PDAL-Wrench clip command but now I apply it to a last file. As an input I use delft.last from the previous step and then I define the polygon which is the boundary shape file and I define the output file name as delft-center.last. After pressing enter it will execute and this also will take some time. Then we can visualize the result of the clipped point cloud in the QGIS 3D view. In this video you've learned how to use PDAL-Wrench commands to process point clouds from the command line. The advantage of command line is that you can automate procedures. You can combine different commands in a batch file to execute them at once.