0

I am normalizing a large point cloud (>16 GB), for which I'm using a preprocessed DTM that I store as .tif. For smaller amounts of data, I would use an R script that lets me do this:

library(lidR)

# load data
las <- readLAS("pointcloud.las")
dtm <- raster("dtm.tif")

# normalize point cloud through subtraction
nlas <- las - dtm

However these files are too big to process (I get std::bad_alloc when running it in R). I wanted to use the LAStools Toolbox that is provided in ArcTools and I get stuck at the point where I define the groundpoints. I'd assume one would just specify the dtm.tif here, however .tif apparently is no supported format, only .txt / .asc and other formats such as .shp, .las, ...

Converting my tif to .asc or .txt with ArcMap -> Conversion Tools will give me a dtm.txt / dtm.asc, but these cannot be read by the tool, as the 'dtm.asc' gives me:

ERROR: was not able to find header
ERROR: cannot open lasreaderasc with file name 'dtm.asc'
ERROR: could not open ground points file

And the 'dtm.txt' gives me:

ERROR: using zero ground points from 'dtm.txt'.
   try running with option '-all_ground_points'.

I have no experience with "raster files as asc/txt", yet was confident that this should work. Am I doing something wrong or overseeing something?

Is there a way to use .tif-files with the LAStools?

Or alternatively: Is there a better way to process these files (to normalize the point cloud)?

1
  • Have a read of gis.stackexchange.com/questions/203279/… - in the answer by Andre Silva it is suggested that an ASCII file can be used for -ground_points to normalize by. To generate an ASCII file from QGIS use Raster::Translate with output format AAIGRID and save with extension .asc (make sure you have plenty of space as ASCII is the 2nd worst raster format for size). You could also try tiling your input with LASTile, normalizing in R and then use LAS2LAS with -merged to untile, this will change point order though. Nov 10 '20 at 2:10
1

I don't believe lasheight has the ability to directly read a raster, so you won't be able to use a TIF as-is.

However, most (all?) lastools support reading BIL-format rasters and treating them as a point cloud. So the center of each pixel becomes a point, and in the case of lasheight it will construct an internal TIN from your raster.

I can't speak to lidr (that uses lastools?), but on the command line you can supply it separately from your point cloud with -ground_points dtm.bil

ESRI BIL reference

GDAL driver reference

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.