15.8. Lesson: DEM from LiDAR Data

You can improve the look of your maps by using different background images. You could use the basic map or the aerial image you have been using before, but a hillshade raster of the terrain will look nicer in some situations.

You will use LAStools to extract a DEM from a LiDAR dataset and then create a hillshade raster to use in your map presentation later.

The goal for this lesson: Install LAStools and calculate a DEM from LiDAR data and a hillshade raster.

15.8.1. basic Follow Along: Installing Lastools

Managing LiDAR data within QGIS is possible using the Processing framework and the algorithms provided by LAStools.

You can obtain a digital elevation model (DEM) from a LiDAR point cloud and then create a hillshade raster that is visually more intuitive for presentation purposes. First you will have to set up the Processing framework settings to properly work with LAStools:

  • Close QGIS, if you have already started it.

  • An old lidar plugin might be installed by default in your system in the folder C:/Program Files/QGIS Valmiera/apps/qgis/python/plugins/processing/.

  • If you have a folder named lidar, delete it. This is valid for some installations of QGIS 2.2 and 2.4.

../../../_images/remove_lidar_folder.png
  • Go to the exercise_data\forestry\lidar\ folder, there you can find the file QGIS_2_2_toolbox.zip. Open it and extract the lidar folder to replace the one you just deleted.

  • If you are using a different QGIS version, you can see more installation instructions in this tutorial.

Now you need to install the LAStools to your computer. Get the newest lastools version here and extract the content of the lastools.zip file into a folder in your system, for example, C:\lastools\. The path to the lastools folder cannot have spaces or special characters.

注解

Read the LICENSE.txt file inside the lastools folder. Some of the LAStools are open source and other are closed source and require licensing for most commercial and governmental use. For education and evaluation purposes you can use and test LAStools as much as you need to.

The plugin and the actual algorithms are now installed in your computer and almost ready to use, you just need to set up the Processing framework to start using them:

  • Open a new project in QGIS.

  • Set the project's CRS to ETRS89 / ETRS-TM35FIN.

  • Save the project as forest_lidar.qgs.

To setup the LAStools in QGIS:

  • Go to Processing ‣ Options and configuration.

  • In the Processing options dialog, go to Providers and then to Tools for LiDAR data.

  • Check Activate.

  • For LAStools folder set c:\lastools\ (or the folder you extracted LAStools to).

../../../_images/processing_options.png

15.8.2. basic Follow Along: Calculating a DEM with LAStools

You have already used the Processing toolbox in Lesson: Spatial Statistics to run some SAGA algorithms. Now you are going to use it to run LAStools programs:

  • Open Processing ‣ Toolbox.

  • In the dropdown menu at the bottom, select Advanced interface.

  • You should see the Tools for LiDAR data category.

../../../_images/processing_toolbox.png
  • Expand it to see the tools available, and expand also the LAStools category (the number of algorithms may vary).

  • Scroll down until you find the lasview algorithm, double click it to open.

  • At Input LAS/LAZ file, browse to exercise_data\forestry\lidar\ and select the rautjarvi_lidar.laz file.

../../../_images/lasview_dialog.png
  • Click Run.

Now you can see the LiDAR data in the just a little LAS and LAZ viewer dialog window:

../../../_images/full_lidar.png

There are many things you can do within this viewer, but for now you can just click and drag on the viewer to pan the LiDAR point cloud to see what it looks like.

注解

If you want to know further details on how the LAStools work, you can read the README text files about each of the tools, in the C:\lastools\bin\ folder. Tutorials and other materials are available at the Rapidlasso webpage.

  • Close the viewer when you are ready.

Creating a DEM with LAStools can be done in two steps, first one to classify the point cloud into ground and no ground points and then calculating a DEM using only the ground points.

  • Go back to the Processing Toolbox.

  • Note the Search... box, write lasground.

  • Double click to open the lasground tool and set it as shown in this image:

../../../_images/lasground_dialog.png
  • The output file is saved to the same folder where the rautjarvi_lidar.laz is located and it is named rautjarvi_lidar_1.las.

You can open it with lasview if you want to check it.

../../../_images/lasground_result.png

The brown points are the points classified as ground and the gray ones are the rest, you can click the letter g to visualize only the ground points or the letter u to see only the unclassified points. Click the letter a to see all the points again. Check the lasview_README.txt file for more commands. If you are interested, also this tutorial about editing LiDAR points manually will show you different operations within the viewer.

  • Close the viewer again.

  • In the Processing Toolbox, search for las2dem.

  • Open the las2dem tool and set it as shown in this image:

../../../_images/las2dem_dialog.png

The result DEM is added to your map with the generic name Output raster file.

注解

The lasground and las2dem tools require licensing. You can use the unlicensed tool as indicated in the license file, but you get the diagonals you can appreciate in the image results.

15.8.3. basic Follow Along: Creating a Terrain Hillshade

For visualization purposes, a hillshade generated from a DEM gives a better

visualization of the terrain:

  • Open Raster ‣ Terrain analysis ‣ Hillshade.

  • As the Output layer, browse to exercise_data\forestry\lidar\ and name the file hillshade.tif.

  • Leave the rest of parameters with the default settings.

../../../_images/dem_hillshade.png
  • Select ETRS89 / ETRS-TM35FIN as the CRS when prompted.

Despite the diagonal lines remaining in the hillshade raster result, you can clearly see an accurate relief of the area. You can even see the different soil drains that have been dug in the forests.

../../../_images/hillshade_result.png

15.8.4. In Conclusion

Using LiDAR data to get a DEM, specially in forested areas, gives good results with not much effort. You could also use ready LiDAR derived DEMs or other sources like the SRTM 9m resolution DEMs. Either way, you can use them to create a hillshade raster to use in your map presentations.

15.8.5. What's Next?

In the next, and final step in this module, lesson you will use the hillshade raster and the forest inventory results to create a map presentation of the results.