Skip to content

Commit

Permalink
fixes #1127
Browse files Browse the repository at this point in the history
  • Loading branch information
rhijmans committed Apr 25, 2023
1 parent 85ee3c9 commit 96a45a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/rasterize.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ rasterize_points <- function(x, y, field, values, fun="last", background=NA, upd
}
nc <- ncol(r)
for (i in 1:b$n) {
w <- matrix(background, nrow=b$nrows * nc, ncol=nl)
w <- matrix(background, nrow=b$nrows[i] * nc, ncol=nl)
mincell <- cellFromRowCol(r, b$row[i], 1)
maxcell <- cellFromRowCol(r, b$row[i] + b$nrows[i]-1, nc)
vv <- values[values[,1] >= mincell & values[,1] <= maxcell, ,drop=FALSE]
Expand Down

0 comments on commit 96a45a2

Please sign in to comment.