rasterize fails with update=T
Closed this issue · 1 comments
Jadamso commented
One of the recent updates to terra now causes rasterize
to fail when update=T
.
Here is a minimal example for terra_1.7-78
library(terra)
y_rast <- rast( matrix(runif(100),10,10))
x_point <- vect( data.frame(x=runif(4),y=runif(4)), geom=c("x", "y"))
rasterize(
x_point, y_rast,
fun=sum, na.rm=T, update=T, background=NA)
rhijmans commented
Thanks, I now get :
rasterize(x_point, y_rast, fun=sum, update=TRUE)
#class : SpatRaster
#dimensions : 10, 10, 1 (nrow, ncol, nlyr)
#resolution : 1, 1 (x, y)
#extent : 0, 10, 0, 10 (xmin, xmax, ymin, ymax)
#coord. ref. :
#source(s) : memory
#name : sum
#min value : 0.0008639263
#max value : 4.0000000000