From #550 by @poornima-s10
I have recently started using
lidR
and have run into some issues withrasterize_canopy
. [...] I have a ground classified/normalised point cloud. I am usingLAScatalog
mainly but in this case have tested bothLAScatalog
andLAS
objects withrasterize_canopy
(to rule out any issues with myLAScatalog
chunks).
library(lidR) las = readLAS("clip2_denoised.las") mycsf <- csf(sloop_smooth=FALSE, cloth_resolution = 0.2, iterations = 500, class_threshold = 0.1) gnd_las <- classify_ground(las, mycsf) norm_las <- normalize_height(gnd_las, knnidw(k=10, p=2)) # this is ok in terra/raster - pulse spacing in clip is 0.03 m. In original file it's 0.02 m. chm = rasterize_canopy(norm_las, res=0.09, p2r(0.2)) # recreate issue seen on original file which had pulse spacing 0.02 m with rasterize_canopy res=0.10 chm = rasterize_canopy(norm_las, res=0.06, p2r(0.2)) #>Error: [] lengths of of cells and values do not match # change to raster options(lidR.raster.default = "raster") chm = rasterize_canopy(norm_las, res=0.06, p2r(0.2)) # No error with raster but output is incorrect. plot(chm, col=height.colors(50))
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4