From 13a1c981aa8e8052f3b195eadb174365437888e6 Mon Sep 17 00:00:00 2001 From: BadgerOnABike Date: Mon, 1 Nov 2021 10:47:53 -0600 Subject: [PATCH] Removed Terra bbox import, swapped for st_bbox --- R/fuel_grid_generator.R | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/R/fuel_grid_generator.R b/R/fuel_grid_generator.R index 948e86c..7393ecc 100644 --- a/R/fuel_grid_generator.R +++ b/R/fuel_grid_generator.R @@ -11,8 +11,8 @@ #' @param pc_col A character vector defining the column for percent conifer in each spatial layer. If the corresponding \code{pc} value is false enter "". #' @param output_directory The directory to place the final fuel grid. If using the generated directories use \code{bp3_base} as the output directory. #' -#' @importFrom terra rast ext vect project extend crs bbox -#' @importFrom sf st_read st_buffer st_transform read_sf st_crop st_make_valid st_cast st_geometry_type +#' @importFrom terra rast ext vect project extend crs +#' @importFrom sf st_read st_buffer st_transform read_sf st_crop st_make_valid st_cast st_geometry_type st_bbox #' @importFrom raster raster crop mask writeRaster resample extend #' @importFrom fasterize fasterize #' @importFrom sp proj4string @@ -124,10 +124,10 @@ fuel_grid_generator <- function(aoi_poly, aoi_buffer = 15000, lut, reference_gri crs = terra::crs(grast) ) ), - xmin = terra::bbox(grast)[1,1], - ymin = terra::bbox(grast)[2,1], - xmax = terra::bbox(grast)[1,2], - ymax = terra::bbox(grast)[2,2] + xmin = sf::st_bbox(grast)[1,1], + ymin = sf::st_bbox(grast)[2,1], + xmax = sf::st_bbox(grast)[1,2], + ymax = sf::st_bbox(grast)[2,2] ) shps <- sf::st_cast(shps, "MULTIPOLYGON")