Convenience wrapper around sf::st_bbox() used to derive a bounding box from a study area, e.g. to reduce processing time of large vector datasets.

create_bbox(studyArea)

Arguments

studyArea

An sf or sfc object (or anything accepted by sf::st_bbox()).

Value

An object of class bbox (see sf::st_bbox()).

Examples

poly <- sf::st_sfc(
  sf::st_polygon(list(rbind(c(0, 0), c(1, 0), c(1, 1), c(0, 1), c(0, 0)))),
  crs = 4326
)
create_bbox(poly)
#> xmin ymin xmax ymax 
#>    0    0    1    1