Skip to content

Commit

Permalink
fixes #703
Browse files Browse the repository at this point in the history
  • Loading branch information
edzer committed Aug 24, 2024
1 parent b1be457 commit 6fb7207
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Suggests:
zoo
VignetteBuilder: knitr
Encoding: UTF-8
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Collate:
'aggregate.R'
'cubble.R'
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 5 additions & 0 deletions R/dimensions.R
Original file line number Diff line number Diff line change
Expand Up @@ -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_
Expand Down

0 comments on commit 6fb7207

Please sign in to comment.