Skip to content

Commit

Permalink
Fix / work-around for #58
Browse files Browse the repository at this point in the history
  • Loading branch information
pepijn-devries committed Nov 11, 2024
1 parent 039fa1f commit 7d6dccf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/coverage.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ emdn_get_coverage <- function(wcs = NULL, service = NULL,
format = NULL,
rangesubset = NULL,
filename = NULL,
nil_values_as_na = FALSE) {
nil_values_as_na = FALSE,
check = TRUE) {
if (is.null(wcs) & is.null(service)) {
cli::cli_abort(c(
"x" =
Expand Down Expand Up @@ -125,7 +126,7 @@ emdn_get_coverage <- function(wcs = NULL, service = NULL,
subset = elevation
)
}
check_cov_contains_bbox(summary, bbox, crs)
if (check) check_cov_contains_bbox(summary, bbox, crs)

cli::cli_rule(left = "Downloading coverage {.val {coverage_id}}")

Expand Down
2 changes: 2 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,8 @@ extr_bbox_crs <- function(summary) {
if (length(crs_parts) == 2) {
srid <- as.integer(crs_parts[2])
if (!is.na(srid)) bbox_crs <- sf::st_crs(srid)
} else if (startsWith(crs_parts[1], "http://www.opengis.net/def/crs/EPSG/0/")) {
bbox_crs <- sf::st_crs(as.integer(gsub("^?.*/", "", crs_parts[1])))
} else {
bbox_crs <- sf::st_crs(4326)
}
Expand Down

0 comments on commit 7d6dccf

Please sign in to comment.