You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have recently started using lidR and have run into some issues with rasterize_canopy. [...] I have a ground classified/normalised point cloud. I am using LAScatalog mainly but in this case have tested both LAScatalog and LAS objects with rasterize_canopy (to rule out any issues with my LAScatalog 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.10chm= 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))
The text was updated successfully, but these errors were encountered:
From #550 by @poornima-s10
clip2_denoise.las
The text was updated successfully, but these errors were encountered: