diff --git a/DESCRIPTION b/DESCRIPTION index 36c2b351..0972d614 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -88,7 +88,7 @@ Suggests: zoo VignetteBuilder: knitr Encoding: UTF-8 -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 Collate: 'aggregate.R' 'cubble.R' diff --git a/NEWS.md b/NEWS.md index ed56f465..b49e6784 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # version 0.6-7 +* `c.stars()` verifies semantic equivalence of objects' CRS; #703 + * initial support for `read_mdim()` to work with `proxy = TRUE`; #659 # version 0.6-6 diff --git a/R/dimensions.R b/R/dimensions.R index d1aa0fa8..94827d5c 100644 --- a/R/dimensions.R +++ b/R/dimensions.R @@ -674,8 +674,13 @@ print.dimensions = function(x, ...) { identical_dimensions = function(lst, ignore_resolution = FALSE, tolerance = 0) { if (length(lst) > 1) { d1 = attr(lst[[1]], "dimensions") + crs1 = st_crs(d1) + st_crs(d1) = NA_crs_ for (i in 2:length(lst)) { di = attr(lst[[i]], "dimensions") + if (st_crs(di) != crs1) # check semantical equivalence; https://github.com/r-spatial/stars/issues/703 + return(FALSE) + st_crs(di) = NA_crs_ if (ignore_resolution) { for (j in seq_along(d1)) d1[[j]]$delta = d1[[j]]$to = NA_real_