Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rasterize fails with update=T #1611

Closed
Jadamso opened this issue Sep 30, 2024 · 1 comment
Closed

rasterize fails with update=T #1611

Jadamso opened this issue Sep 30, 2024 · 1 comment

Comments

@Jadamso
Copy link

Jadamso commented Sep 30, 2024

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
Copy link
Member

rhijmans commented Oct 2, 2024

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 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants