3

Main question: Is there a way of creating a Canopy Height Model from a LAS file using Mac (not wine etc)? I also would like to batch process a lot of LAS files the same way.

I should mention that I have tried PDAL with writers.gdal through docker where I managed to make a DTM and DSM. But then what? Is it possible to create a CHM with PDAL? I saw lidar2dems but I'm not sure it would work on Mac.

Maybe there are more alternatives than PDAL?

3
  • You can use LasTools (I think) rapidlasso.com/2014/10/04/using-lastools-on-mac-os-x-with-wine not being a Mac user I can't verify the text. Is your LAS classified to at least ground/nonground? you need to create a ground raster (class 2,8 and possibly 9) and nonground height raster then subtract the ground from the nonground using QGIS raster calculator (or other package that works on Mac) consider where there is no vegetation or just noise and decide if you want 0 or NoData where the rasters are very similar before processing. Mar 15, 2017 at 0:25
  • Why are you against using wine? Lastools runs fine using wine. More details here: rapidlasso.com/2014/10/04/using-lastools-on-mac-os-x-with-wine. Additionally, here is a lastools article on generating CHMs: rapidlasso.com/2014/11/04/…. If you have serious processing needs, spin up an AWS EC2 instance running Ubuntu using lascanopy.
    – Aaron
    Mar 15, 2017 at 2:57
  • I should have mentioned that I don't have the economy to use rapidlassos license. Therefore that's not really an option for me.
    – oskarlin
    Mar 15, 2017 at 9:26

3 Answers 3

5

I ended up with this solution with PDAL and GDAL:

First I used liblas to create LAS containing only ground points. Then I used PDAL similar to the "Basic Example" but with output_type: max to create a DTM from the terrain LAS and a DSM from the original LAS.

Then just gdal_calc.py with these to elevation models to get a DHM.

gdal_calc.py -A DSM.tif -B DTM.tif --outfile=CHM.tif --calc="A-B" --NoDataValue=0
9
  • Hey is output_type: max really "comparable" to so called DSM or DTM? Is it a particular type of DSM or DTM? This answer is nice, because it allows staying within Python.
    – mavavilj
    Feb 6, 2020 at 11:37
  • Actually I've changed it to "idw" now.
    – oskarlin
    Feb 10, 2020 at 10:12
  • Okay, yet this doesn't answer my question about what kind of DSM or DTM you do? Whether it's based on some standard or whether it's your own take on them?
    – mavavilj
    Feb 11, 2020 at 13:32
  • Oh, sorry. I create one model which takes all the ground points from the LAS file and then another one which takes canopy points.
    – oskarlin
    Feb 12, 2020 at 14:08
  • Have you tried importing the resulting .tif to QGIS does it import? I tried doing the same using the GDAL for Python library and I get "invalid provider" error.
    – mavavilj
    Feb 19, 2020 at 14:52
4

In addition to what has been mentioned above, SPDLib is another powerful set of open-source tools for processing LiDAR data (LAS files). It is cross-platform and supports Mac.

The spdinterp program has the capability to generate Canopy Height Models as well as DTMs and DSMs.

4

1) You can use the the little known Whitebox GAT (Mac version, Download Whitebox Geospatial Analysis Tools), developed for the Java platform (Java Runtime Environment (JRE) version 8.0 or higher installed) and Open Source (GNU General Public License version 3)

Look at Working with LiDAR data in Whitebox GAT

enter image description here

2) You can also use

There are other solutions if you know Python or R (lidR package: Compute a digital canopy model (DCM) for example)

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.