One caveat to using FUSION: it truncates the precision of the output coordinates to only 4 decimal places, and I required 6. I really wanted to use WhiteBox GAT, however I was unable to get it to perform the nearest-neighbor processing (it kept insisting that the units from my files were in meters, not decimal degrees)
I ended up using SAGA GIS on the command line (functions on Windows and Linux - there's a Mac port in Brew but it's several revisions behind and didn't have LAS support).
I did a very rough job and simply converted the LAS point cloud directly into a raster grid via performing mean sampling for every grid square. As a result, the output file has a lot of holes. This could be fixed with one of the Gridding tools such as triangulation, nearest-neighbor, etc. However, those tools hung the app, possibly due to the sheer size of the dataset.
For my purposes, simply sampling works fine, and has the added benefit of being significantly faster to process, as the performance is gated by I/O rather than CPU (SAGA has the side benefit of being more multi-core aware, as opposed to FUSION).
Rough steps which can be done in the GUI:
- Import LAS file to a Point Cloud file
- Use Point Cloud to Grid tool and set the Cellsize value – I used
0.00001 to represent the resolution in decimal degrees I required (going beyond that significantly increased computation and file
size requirements)
- Export data in ESRI ASCII Grid format
I also needed to use las2las.exe to move the data from LAZ to LAS format, since SAGA doesn't support LAZ yet.
The following is the Windows batch script which I used to successfully process ~450 files
REM ********************************* PATHS ***********************************
REM Path to saga_cmd.exe and LAStools
set PATH=%PATH%;C:\SAGA;C:\laser\LAStools\bin
REM Path to working dir
SET WORK=C:\laser
REM ***************************************************************************
FOR /F %%i IN ('dir /b %WORK%\*.laz') DO (
cd /d %WORK%
saga_cmd io_shapes_las 1 ^
-FILES=%WORK%\%%~ni.las ^
-POINTS=%WORK%\%%~ni ^
-T=0 -i=0 -a=0 -r=0 -c=0 -u=0 -n=0 -R=0 -G=0 -B=0 -e=0 -d=0 -p=0 -C=0 ^
-VALID=0 -RGB_RANGE=0
saga_cmd pointcloud_tools 4 ^
-POINTS=%WORK%\%%~ni.spc ^
-GRID=%WORK%\%%~ni ^
-OUTPUT=0 -AGGREGATION=0 ^
-CELLSIZE=0.00001
saga_cmd io_grid 0 ^
-GRID=%WORK%\%%~ni.sdat ^
-FILE=%WORK%\%%~ni.asc ^
-FORMAT=1 -GEOREF=0 -PREC=6 -DECSEP=0
del *.mgrd
del *.mpts
del *.sgrd
del *.spc
del *.sdat
)
PAUSE
Note that if you're working with .LAZ files, you'll need to uncompress them to .LAS format with las2las, like below:
las2las.exe -i %%i -o %%~ni.las
and probably of these to delete it too
del *.las