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
To be able to use a raster as a template given the argument res, this raster can not be in a SpatRaster format. One sollution is simple and is to convert it to a RasterLayer with raster::raster().
This is a reproducible example to use the maximum height raster as a template for minimum heigh calculation:
library(lidR)
LASfile<- system.file("extdata", "Megaplot.laz", package="lidR")
ctg<- readLAScatalog(LASfile, select="xyz", chunk_size=140, chunk_buffer=0)
opt_chunk_alignment(ctg) <- c(0,20)
plot(ctg, chunk=TRUE)
library(future)
plan(multisession, workers=2)
m= pixel_metrics(ctg, ~max(Z), 20)
# Works
pixel_metrics(ctg, ~min(Z), m)
# Does not work
pixel_metrics(ctg, ~miin(Z), raster(m))
# Works
The text was updated successfully, but these errors were encountered:
To be able to use a raster as a template given the argument
res
, this raster can not be in aSpatRaster
format. One sollution is simple and is to convert it to aRasterLayer
withraster::raster()
.This is a reproducible example to use the maximum height raster as a template for minimum heigh calculation:
The text was updated successfully, but these errors were encountered: