4

I have less than a dilettante's knowledge of GIS, but a friend showed me a Digital Elevation Model (DEM) image of some land and I thought that I would like to give it a try. I downloaded the latest version of QGIS and have added plugins for WhiteBox Tools and LASTools. I have what I consider to be the lowest of ambitions with this software: to render a DEM so that I can view the layout of my forestland without trees.

I downloaded LIDAR data in twelve .LAS files from the USGS site (three panels across, four panels down). I dragged and dropped them into an empty project in QGIS, and, after much rendering, they nicely re-assembled themselves into a single, two-tone, pixelated version of the twelve adjacent areas that I downloaded from USGS.

The QGIS "Layers" properties box lists all twelve .LAS files, and when I expand each of them, I remove all Symbology except "Ground". At this point, I am uncertain how to proceed. I watched a few videos and tried to use the "Hillshade" processing, but the box that pops up asks for the LIDAR input file, among other things. Since I have all twelve .LAS files loaded and displayed on the screen (and thus, to my mind, already inputted), I am not certain what that function is looking for.

Has anyone documented how to generate a DEM and apply the Hillshade effect when the data are in twelve .LAS files, not one?

It feels that it is just out of my grasp, although I readily admit that I have little basis for that optimism.

2
  • 2
    I have never processed las files in QGIS, but have you tried creating two DEM rasters from 2 las files, then merge them and create a hillshade from the output? With 12 files it should be possible to do it manually
    – Bera
    Commented Jan 4, 2022 at 6:56
  • 4
    Or merge the las files
    – Bera
    Commented Jan 4, 2022 at 7:01

3 Answers 3

2

As Bera recommend, you can merge your las files into one using lastools. You can set lasmerge to keep ground only also (-keep_class 2 on aditional command line parameters of lasmerge dialog box). To generate the DEM you can use LidarIDWInterpolation from Whiteboxtools. You can use this algorithm with the merged las file.

Another thing you can try is to convert your merged file to a point file, and then use other interpolation tools available in qgis. To convert the merged las file to a point file, you can use las2txt. You will have a txt file with the x, y, z coordinates from your data. You can use it in qgis as a text delimited layer and use multilevel B-Spline interpolation, for instance, from the tool box (a Saga algorithm) to obtain your DEM.

Lastools has also las2dem and blast2dem, but you will have to get a license to use it, otherwise you will obtain a “watermark” of lines over your DEM.

1

Thank you Bera. Your suggestion led me in the right direction. After trying merging and a few other things with Whitebox Tools (LidarJoin), with mixed results, I revisited the video that got me the farthest, and I found a way forward.

QGIS 4 Arch - LiDAR to DEM with LASTools (Jul 9, 2020) https://www.youtube.com/watch?v=FFLxnBTgtnw

Here are the relevant timestamps in the video:

5:31 Used LASSplit in the Processing Toolbox to break a .LAS file into smaller pieces. Here I simply repeated the process twelve times for each of my twelve, large .LAS files. That was the key I was missing. (NOTE: The whole point of the splitting is to generate file sizes below the threshold where streaks are introduced in the final DEM.)

6:40 Dumped the many, many smaller .LAS files all into a new directory I named "Smaller".

7:25 Use las2demPro in the Processing Toolbox:

  • For "Input Directory", selected the directory containing the smaller .LAS files ("Smaller").
  • For "Input Wildcard(s)", I entered "*.las"
  • For "Filter (by return, classification, flags)", I selected "keep_class_2". NOTE: I believe that class 2 is the "ground" lidar returns only -- tutorial doesn't clarify that.
  • Scroll down the las2demPro window and check the box "run new 64-bit executable".
  • For "Output Directory", I just chose my "Smaller" directory.
  • Clicked the "run" button.

This generated hundreds of files, including 100 ".tif" files. We have to merge those .tif's into one, large .tif, so . . .

8:41 Used "Merge", which is under "Raster Miscellaneous" in the Processing Toolbox.

  • For "Input Layers" selected all of the .tif files just generated.
  • For "Merged" specified a path and filename for the resulting, huge, merged .tif (I named it "MergedLIDAR.tif").
  • Clicked "run".

Saw my DEM displayed in the QGIS main window in fuzzy grayscale; it was recognizable as the land that I had specified when I downloaded the .LAS files from USGS. The "Layers" panel to the left contained the file name of my big .tif. I clicked on the "Layer Styling" icon on the "Layers" panel.

9:42 In the "Layer Styling" properties box, changed "Singleband gray" to "Hillshade", and voila! All of the folds of land, ditches, rises, depressions appeared in sharp detail!

I now know just enough to be dangerous, and I will explore the alternative approaches suggested by Gerardo.

Many thanks to Bera and Gerardo!

1

You may try reading the section "How to process LiDAR Data" (https://www.whiteboxgeo.com/manual/wbt_book/tutorials/lidar.html) in the WhiteboxTools user manual. Specifically, it goes over a couple of the questions you raised about batch processing of LAS files into an interpolated DEM.

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.