LiDAR Data Processing with LAStools and QGIS 3

Light Detection and Ranging (LiDAR) is a spatial data acquisition method that used laser light and specialized GPS receiver. LiDAR surveying activity will produce millions of point which is called point cloud that consist of X,Y and Z information. Therefore using LiDAR for mapping or 3D objects reconstruction will generate a more detail output and also cost-effective compared to traditional surveying method.

There are many software or tools available to process LiDAR data such as: Global Mapper LIDAR module, ArcGIS LIDAR, Merric MARS, TerraSolid, ENVI-LIDAR and many more. In this tutorial I will discuss how to process LiDAR data using LAStools in QGIS 3.

The following topics will be discussed in this tutorial:
  • How to install LAStools in QGIS 3
  • How to inspect LiDAR data
  • Viewing LiDAR data
  • How to create Digital Elevation  Model (DEM) from LiDAR data

Installing LAStools Plugin

Before installing the LAStools plugin for QGIS, firstly we have to download the software from rapidlasso. The software will be downloaded in a zip format. Extract it and then copy to a drive. For Windows operating system, the default location is in drive C. If you place it in another drive, then you have to set the path in QGIS. I will show you how to do it just in a minute.

After downloading and extracting the LAStools, next we will install the plugin. As usual, to do a plugin installation in QGIS, open Manage and Install Plugins.. from Plugins menu. The plugins installation window will appear as in figure 1. In the search box type lastools, immediately the QGIS LAStools plugin will show up. Check it, then push Install Plugin button
LAStools plugin installation in QGIS 3
Figure 1. LAStools Plugin Installation
To change the LAStools plugin directory path, from Settings menu select Options... The option window will show up as in figure 2. Go to Processing menu on the left column, then click Providers. You will see all the processing tools that already installed. Here is the location where we modify the path of the installed tools, including the LAStools. Click the LAStools, and you will see the folder path. Just change it with your LAStools folder path.   

LAStools plugin path QGIS 3
Figure 2. LAStools Plugin Path

Inspecting LiDAR Data

Now, let's see the LAStools in action. For this QGIS LAStools tutorial I used a classified LIDAR data from North Dakota that can be downloaded at North Dakota LiDAR Dissemination Map Service. The Lidar dataset that was used in this tutorial can be downloaded here.

For the first action, we will inspect the LiDAR data using Lasinfo tool. The tool can be found in LAStools file-checking quallity in the Processing Toolbox as in figure 3.
Lasinfo tool QGIS
Figure 3. Lasinfo tool
Open the lasinfo tool, the window will appear as in figure 4. In the input LAS/LAZ file parameter, input the LiDAR dataset in LAS or LAZ format. The result of LiDAR file inspection can be seen as in figure 5. From the result can be seen some information regarding the inspected data like creation date, number of points, coordinate system, minimum and maximuman coordinate, classification points and so on. 
Lasinfo tool processing
Figure 4. Lasinfo tool processing
Lasinfo tool result
Figure 5. Lasinfo tool result

Viewing LiDAR Data


Next, let's see how is the data looks like. To view a LiDAR data, the lasview tool is used. The tool can be found also in the LAStools file-checking quallity (See figure 3). Figure 6 shows the Lasview window. In the input LAS/LAZ file parameter, input a LiDAR data to be viewed. Push the Run button to start the process. When finished, the preview window of the input LiDAR data will be opened as in figure 7. Play with it by rotating, rendering by specific object, changing the color, etc. 
Lasview tool QGIS
Figure 6. Lasview tool

Figure 7. Lasview window

Splitting LiDAR Data

In the next part of this tutorial, we will create Digital Elevation Model (DEM). We begin this process by splitting the data. This step is required prior processing the data into DEM to prevent diagonal black stripe as shown in figure 8 in the result. How could the black stripe appears? Where is it come from? Actually the LAStools is not fully free tools. When the number of points exceeded 1.5 million, the black stripe will be inserted to the result. One way to overcome it is by splitting the data. Otherwise consider to purchase the license, especially when you're working with large area.
DEM from LiDAR with black stripes
Figure 8. DEM from LiDAR with black stripes
To split a LiDAR data can be used the lassplit tool that can be found in LAStools file-processing points. The lassplit tool window can be seen in figure 9. Like in previous tool, input a LiDAR data to be splitted. Put -split 1000000 in additional command line parameter(s), this command will split each output file with one million points. 1000000 is a variable, so it can be any positive number. The Output LAS/LAZ file is the output location path. I suggest to make a new folder to store the result, so it won't mixed up with other files. The output file(s) has laz extension. It is a compression format of las LiDAR data. After running the split tool, some output files in laz extension will be generated.
   
Lassplit window tool QGIS
Figure 9. Lassplit window

Creating Digital Elevation Model (DEM)

To create DEM from LiDAR data using LAStools can be done using las2dem or las2demPro. las2dem is a single file processing tool. On the other hand las2demPro is multiple files processing within a folder. Because we have some files form previous split process, then las2demPro is a right choice. The las2demPro tool can be found in LAStools folder-raster derivatives.

Figure 10 shows the window of las2demPro. In the input directory parameter specify the folder where contains all files to be processed. Depends on file extension whether las or laz, set the parameter of input wilcard(s). The filter parameter is very important in this step, because in creating DEM, we have to exclude all points except ground points. For this, we must select keep_class 2 option in the filter parameter. The default classification number for ground point in LiDAR data is 2. To check the number of point classification can be done also using lasinfo tool. Figure 11 is the result of lasinfo that shows the number of points and it's classification class. 
       
las2demPro tool window lidar qgis
Figure 10. las2demPro tool window
   
Lasinfo tool result
Figure 11. Lasinfo tool result

Merging DEM Data


After running the las2demPro tool, the DEM data in tif format will be created as shown in figure 12. At the boundary of each DEM tile can be seen a straight separation line of each tile due to tone color difference. Actually nothing wrong with it, just a visual effect. If the area if not large enough and could be rendered smoothly, merging all the tiles is a good approach.

To merge all the tiles can be used GDAL Merge tool. To find the tool type merge in the Processing Toolbox searching option, and look at the tool below GDAL tool as shown in figure 13.   

DEM data LIDAR
Figure 12. DEM data before merging
GDAL Merge Tool
Figure 13. GDAL Merge Tool
Figure 14 shows the GDAL Merge tool. In the Input layers parameter select all layers or files to be merged. In the Merged parameter set the output path to store the output file. The result of merged DEM tiles can be seen as in figure 15.
GDAL Merge Tool
Figure 14. GDAL Merge Tool

Merged DEM LIDAR
Figure 15. Merged DEM

Hillshading

Before ending this tutorial, let's visualize the DEM with hillshading to get a better depth visualization. Add the merged DEM file to QGIS map canvas. Then right click the layer and select Properties. The layer properties window will appear as in figure 16

Layer Properties Window
Figure 16. Layer Properties Window
Select Symbology on the left menu then select Hillshade option in the Render type parameter. Finally hit OK button and the hillshading result of DEM can be seen as in figure 17. Comparing with figure 8, now the diagonal black stripes are gone. Nice! Furthermore if you want to visualize the DEM in 3D view just check out another tutorial 3D DEM Visualization in QGIS.

DEM with hillshading visualization
Figure 17. DEM with hillshading visualization
That's all the tutorial how to process LiDAR data using LAStools in QGIS 3. In this tutorial we had learnt how to inspect LiDAR data, viewing LiDAR data, creating DEM from LiDAR data and visualize it in hillshading mode to get a better depth visualization. Check out this tutorial to make a beautiful hillshade map. LAStools is a powerful tool that can do other processing tasks. If you want explore more about LAStools just check out rapidllasso GmbH web page.

Related Posts

Disqus Comments