Skip to content

Commit

Permalink
fix bug in cropInputs.sf
Browse files Browse the repository at this point in the history
  • Loading branch information
achubaty committed Feb 13, 2019
1 parent c5a31c5 commit 735ba6d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/postProcess.R
Expand Up @@ -311,7 +311,9 @@ cropInputs.sf <- function(x, studyArea = NULL, rasterToMatch = NULL,
projectExtent(cropTo, crs(x))
} else {
if (is(studyArea, "sf")) {
sf::st_transform( x = cropTo, crs = st_crs(x))
sf::st_transform(x = cropTo, crs = st_crs(x))
} else if (is(studyArea, "Spatial")) {
sf::st_transform(x = sf::st_as_sf(cropTo), crs = st_crs(x))
} else {
NULL
}
Expand Down

0 comments on commit 735ba6d

Please sign in to comment.