Skip to content

Commit

Permalink
Standardize download methods
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemahoney218 committed Aug 25, 2023
1 parent 4506c38 commit 8cdd1cc
Show file tree
Hide file tree
Showing 17 changed files with 372 additions and 605 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ Imports:
proceduralnames,
rlang,
rstac,
sf,
terra,
tibble
Suggests:
terra,
testthat (>= 3.0.0)
Config/testthat/edition: 3
LazyData: true
20 changes: 20 additions & 0 deletions R/calculate_indices.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,23 @@ calculate_indices <- function(raster,
)
output_filename
}

check_indices <- function(remap_band_names, indices, call = rlang::caller_env()) {
good <- TRUE
if (!is.null(remap_band_names)) {
good <- vapply(
indices$bands,
\(bands) all(bands %in% unlist(remap_band_names)),
logical(1)
)
}

if (!any(good)) {
rlang::abort(
"Some indices cannot be calculated using the available image bands.",
call = call,
class = "rsi_missing_indices"
)
}
}

18 changes: 0 additions & 18 deletions R/check_indices.R

This file was deleted.

120 changes: 0 additions & 120 deletions R/get_dem.R

This file was deleted.

29 changes: 0 additions & 29 deletions R/get_items.R

This file was deleted.

141 changes: 0 additions & 141 deletions R/get_landsat_imagery.R

This file was deleted.

Loading

0 comments on commit 8cdd1cc

Please sign in to comment.