Skip to content

Commit

Permalink
Small adjustments on crs assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Oct 26, 2023
1 parent e7803d6 commit bfef010
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/rasterpic_img.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ rasterpic_img <- function(x, img, halign = .5, valign = .5, expand = 0,

if (mask) {
if (inherits(x, "SpatVector")) {
# Ensure CRS in the SpatVector
terra::crs(x) <- crs

new_rast <- terra::mask(new_rast, x,
inverse = inverse
)
Expand Down

0 comments on commit bfef010

Please sign in to comment.