Skip to content

Commit

Permalink
Allow sfc entries #92
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejohnson51 committed Dec 23, 2023
1 parent 6db5c88 commit 09fd28b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# climateR 0.3.3

* Change environment handling to allow climateR functions to be used in other functions
* Change AOI handling to allow for `sfc`
4 changes: 4 additions & 0 deletions R/climater_filter.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ climater_filter <- function(id = NULL,

### ---- AOI filter
if(!is.null(AOI)){

if(inherits(AOI, "sfc")){
AOI = vect(AOI)
}

gid = sapply(1:nrow(catalog), function(x) {
suppressWarnings({
Expand Down
2 changes: 2 additions & 0 deletions R/dap.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ dap <- function(URL = NULL,

if(inherits(AOI, "list")){
aoi = AOI[[1]]
} else if(inherits(AOI, "sfc")){
aoi = vect(AOI)
} else {
aoi = AOI
}
Expand Down

0 comments on commit 09fd28b

Please sign in to comment.