Closed Jean-Romain closed 1 year ago
want to update you.
When I run my code for the whole dataset (625 las files), it gave me an error
> crown_metrics(ctg_segmented, NULL, geom = "convex")
Error in lazyeval::f_capture(func) : Promise has already been forced
Calls: crown_metrics -> crown_metrics.LAScatalog -> <Anonymous>
When I ran my code for partial data (20~30 las files), it gave the results that I wanted.
However, I also found that some las files were missing.
Do you think does it relate to the bug?
Bests,
Not related at all for sure. Open a new issue with a reproducible exemple
MRE
library(lidR)
LASfile <- system.file("extdata", "MixedConifer.laz", package="lidR")
las <- readLAS(LASfile)
col <- pastel.colors(200)
chm <- rasterize_canopy(las, res = 0.5, p2r(0.3))
f = tempfile(fileext = ".tif")
terra::writeRaster(chm, f)
chm = terra::rast(f)
ttops <- locate_trees(chm, lmf(4, 2))
las <- segment_trees(las, silva2016(chm, ttops))
Fixed
Thanks !!
Do I need to update the package to apply it?
You need to install version 4.0.4 from github. It has not been released on CRAN yet
Discussed in https://github.com/r-lidar/lidR/discussions/693