Skip to content

Commit

Permalink
d
Browse files Browse the repository at this point in the history
  • Loading branch information
rhijmans committed Feb 13, 2024
1 parent 8dec2df commit 1401133
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions R/coerce.R
Original file line number Diff line number Diff line change
Expand Up @@ -586,9 +586,9 @@ setAs("im", "SpatRaster",
function(from) {
r <- rast(nrows=from$dim[1], ncols=from$dim[2], xmin=from$xrange[1], xmax=from$xrange[2], ymin=from$yrange[1], ymax=from$yrange[2], crs="")
values(r) <- from$v
units(r) <- im$units$singular
if (im$units$multiplier != 1) {
r <- r * im$units$multiplier
units(r) <- from$units$singular
if (from$units$multiplier != 1) {
r <- r * from$units$multiplier
}
flip(r, direction="vertical")
}
Expand Down
3 changes: 2 additions & 1 deletion man/cells.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ Get the cell numbers covered by a SpatVector or SpatExtent. Or that match values

\S4method{cells}{SpatRaster,numeric}(x, y)

\S4method{cells}{SpatRaster,SpatVector}(x, y, method="simple", weights=FALSE, exact=FALSE, touches=is.lines(y))
\S4method{cells}{SpatRaster,SpatVector}(x, y, method="simple", weights=FALSE, exact=FALSE,
touches=is.lines(y), small=TRUE)

\S4method{cells}{SpatRaster,SpatExtent}(x, y)
}
Expand Down

0 comments on commit 1401133

Please sign in to comment.