Friday 24 April 2015

lidar - Creating a Canopy Height Model (CHM) image from a LAS file on Mac?


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?



Answer



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

No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...