Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: spatialgridr
Title: Grid spatial data
Version: 0.0.2.2
Version: 0.0.2.3
Authors@R: person(given = "Jason", family = "Flower", email = "jflower@ucsb.edu", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-6731-8182"))
Description: An R package that allows easy gridding of spatial data.
License: GPL (>= 3) + file LICENSE
Expand All @@ -12,22 +12,22 @@ Imports:
checkmate,
dplyr,
exactextractr,
magrittr,
mregions2,
methods,
remotes,
rlang,
rnaturalearth,
rnaturalearthhires (>= 1.0.0.9000),
sf,
stats,
terra,
utils
Suggests:
codetools,
mregions2 (>= 1.0.0),
rnaturalearth,
rnaturalearthhires (>= 1.0.0.9000),
testthat (>= 3.0.0)
URL: https://emlab-ucsb.github.io/spatialgridr/
Config/testthat/edition: 3
Remotes:
github::lifewatch/mregions2,
github::ropensci/rnaturalearthhires
Config/roxygen2/version: 8.0.0
4 changes: 0 additions & 4 deletions R/get_boundary.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ get_boundary <- function(name = "Australia", type = "eez", country_type = "count
checkmate::assert_choice(country_type, c(country_types, "ocean", "high_seas", "seas_oceans"))

if(type %in% mregions_types){
rlang::check_installed("mregions2", reason = "to use `get_boundary()` to access marine boundaries", action = \(pkg, ...) remotes::install_github("lifewatch/mregions2"))
query_type <- mregions_types_lookup[which(mregions_types == type)]

if(type == "high_seas") return(mregions2::mrp_get("high_seas"))
Expand All @@ -108,9 +107,6 @@ get_boundary <- function(name = "Australia", type = "eez", country_type = "count

eval(parse(text = paste0("mregions2::mrp_get(\"", query_type, "\", cql_filter = \"", mregions_country_type, " = '", name, "'\")")))
} else{
rlang::check_installed("rnaturalearth", reason = "to use `get_boundary()` to access land boundaries", action = \(pkg, ...) remotes::install_github("ropensci/rnaturalearth"))
rlang::check_installed("rnaturalearthhires", reason = "to use `get_boundary()` to access high resolution land boundaries", action = \(pkg, ...) remotes::install_github("ropensci/rnaturalearthhires"))

if(is.null(name)) {
message("You have requested all ", type, " boundaries.")
if(type == "country") return(rnaturalearth::ne_countries(scale = 10, returnclass = "sf")) else{
Expand Down
Loading