Running 'aggregate.R'
  Comparing 'aggregate.Rout' to 'aggregate.Rout.save' ...4c4
< Linking to GEOS 3.9.1, GDAL 3.3.2, PROJ 7.2.1
---
> Linking to GEOS 3.9.0, GDAL 3.2.1, PROJ 7.2.1
57c57
< file22b8c2b3437f2.tif    33  199.25  365.5 365.5  531.75  698
---
> file46ef83309cd.tif    33  199.25  365.5 365.5  531.75  698
  Running 'area.R'
  Comparing 'area.Rout' to 'area.Rout.save' ...51a52,64
> /PRODUCT/longitude, 
> /PRODUCT/latitude, 
> /PRODUCT/SUPPORT_DATA/DETAILED_RESULTS/nitrogendioxide_summed_total_column, 
> stars object with 2 dimensions and 1 attribute
> attribute(s):
>                Min.  1st Qu.   Median     Mean  3rd Qu.      Max.
> area [m^2] 25983110 28008871 35690854 42912281 54562137 100943458
> dimension(s):
>   from  to offset delta refsys point                                 values x/y
> x    1 450     NA    NA WGS 84    NA [450x278] -5.81066 [°],...,30.9468 [°] [x]
> y    1 278     NA    NA WGS 84    NA  [450x278] 28.3605 [°],...,51.4686 [°] [y]
> curvilinear grid
> There were 15 warnings (use warnings() to see them)
  Running 'crop.R'
  Comparing 'crop.Rout' to 'crop.Rout.save' ... OK
  Running 'curvilinear.R'
  Comparing 'curvilinear.Rout' to 'curvilinear.Rout.save' ...54a55,88
> /PRODUCT/longitude, 
> /PRODUCT/latitude, 
> /PRODUCT/SUPPORT_DATA/DETAILED_RESULTS/nitrogendioxide_summed_total_column, 
> stars object with 3 dimensions and 1 attribute
> attribute(s):
>                                            Min.      1st Qu.       Median
> nitrogendioxide_summed_total_c...  3.650813e-05 7.451281e-05 8.296968e-05
>                                            Mean      3rd Qu.         Max. NA's
> nitrogendioxide_summed_total_c...  8.581399e-05 9.397442e-05 0.0004535302  330
> dimension(s):
>      from  to offset delta refsys point                                 values
> x       1 450     NA    NA WGS 84    NA [450x278] -5.81066 [°],...,30.9468 [°]
> y       1 278     NA    NA WGS 84    NA  [450x278] 28.3605 [°],...,51.4686 [°]
> time    1   1     NA    NA     NA    NA                                   NULL
>      x/y
> x    [x]
> y    [y]
> time    
> curvilinear grid
> stars object with 3 dimensions and 1 attribute
> attribute(s):
>                                            Min.      1st Qu.       Median
> nitrogendioxide_summed_total_c...  4.383528e-05 7.480038e-05 8.344652e-05
>                                            Mean      3rd Qu.        Max. NA's
> nitrogendioxide_summed_total_c...  8.607374e-05 9.398567e-05 0.000192237   32
> dimension(s):
>      from to offset delta refsys point                               values x/y
> x       1 50     NA    NA WGS 84    NA [50x31] -5.81066 [°],...,30.1405 [°] [x]
> y       1 31     NA    NA WGS 84    NA  [50x31] 28.7828 [°],...,51.4686 [°] [y]
> time    1  1     NA    NA     NA    NA                                 NULL    
> curvilinear grid
> null device 
>           1 
> There were 15 warnings (use warnings() to see them)
  Running 'datasets.R'
  Comparing 'datasets.Rout' to 'datasets.Rout.save' ...30,32c30,38
< Warning message:
< In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
<   there is no package called 'starsdata'
---
> stars_proxy object with 1 attribute in 1 file(s):
> $`MTD_MSIL1C.xml:10m:EPSG_32632`
> [1] "[...]/MTD_MSIL1C.xml:10m:EPSG_32632"
> 
> dimension(s):
>      from    to offset delta                refsys point    values x/y
> x       1 10980  3e+05    10 WGS 84 / UTM zone 32N    NA      NULL [x]
> y       1 10980  6e+06   -10 WGS 84 / UTM zone 32N    NA      NULL [y]
> band    1     4     NA    NA                    NA    NA B4,...,B8    
  Running 'dimensions.R'
  Comparing 'dimensions.Rout' to 'dimensions.Rout.save' ...7,19d6
< Warning messages:
< 1: In CPL_read_gdal(as.character(x), as.character(options), as.character(driver),  :
<   GDAL Message 1: Recode from UTF-8 to CP_ACP failed with the error: "Invalid argument".
< 2: In CPL_read_gdal(as.character(x), as.character(options), as.character(driver),  :
<   GDAL Message 1: Recode from UTF-8 to CP_ACP failed with the error: "Invalid argument".
< 3: In CPL_read_gdal(as.character(x), as.character(options), as.character(driver),  :
<   GDAL Message 1: Recode from UTF-8 to CP_ACP failed with the error: "Invalid argument".
< 4: In CPL_read_gdal(as.character(x), as.character(options), as.character(driver),  :
<   GDAL Message 1: Recode from UTF-8 to CP_ACP failed with the error: "Invalid argument".
< 5: In CPL_read_gdal(as.character(x), as.character(options), as.character(driver),  :
<   GDAL Message 1: Recode from UTF-8 to CP_ACP failed with the error: "Invalid argument".
< 6: In CPL_read_gdal(as.character(x), as.character(options), as.character(driver),  :
<   GDAL Message 1: Recode from UTF-8 to CP_ACP failed with the error: "Invalid argument".
  Running 'extract.R'
  Comparing 'extract.Rout' to 'extract.Rout.save' ... OK
  Running 'gridtypes.R'
Running the tests in 'tests/gridtypes.R' failed.
Complete output:
  > suppressPackageStartupMessages(library(stars))
  > 
  > # regular, but not spatial:
  > d = st_dimensions(a = 1:3, b = 1:3, band = c("foo", "bar"))
  > (st = st_as_stars(array(1:18, c(3,3,2)), dimension = d))
  stars object with 3 dimensions and 1 attribute
  attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max.
  X     1    5.25    9.5  9.5   13.75   18
  dimension(s):
       from to offset delta refsys point   values
  a       1  3      1     1     NA FALSE     NULL
  b       1  3      1     1     NA FALSE     NULL
  band    1  2     NA    NA     NA FALSE foo, bar
  > as.data.frame(st, add_max=FALSE)[1:4,]
    a b band X
  1 1 1  foo 1
  2 2 1  foo 2
  3 3 1  foo 3
  4 1 2  foo 4
  > try(x <- st_bbox(st)) # error
  Error in st_bbox.dimensions(st_dimensions(obj), ...) : 
    dimensions table does not have x & y, nor an sfc dimension
  > 
  > # regular, geotransform:
  > d = st_dimensions(x = 1:3, y = 1:3, band = c("foo", "bar"), .raster = c("x", "y"))
  > (st = st_as_stars(array(1:18, c(3,3,2)), dimension = d))
  stars object with 3 dimensions and 1 attribute
  attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max.
  X     1    5.25    9.5  9.5   13.75   18
  dimension(s):
       from to offset delta refsys point   values x/y
  x       1  3      1     1     NA FALSE     NULL [x]
  y       1  3      1     1     NA FALSE     NULL [y]
  band    1  2     NA    NA     NA FALSE foo, bar    
  > as.data.frame(st, add_max=FALSE)[1:4,]
      x   y band X
  1 1.5 1.5  foo 1
  2 2.5 1.5  foo 2
  3 3.5 1.5  foo 3
  4 1.5 2.5  foo 4
  > as.data.frame(st, add_max=TRUE)[1:4,]
    x y band x_max y_max X
  1 1 1  foo     2     2 1
  2 2 1  foo     3     2 2
  3 3 1  foo     4     2 3
  4 1 2  foo     2     3 4
  > st_bbox(st)
  xmin ymin xmax ymax 
     1    1    4    4 
  > 
  > # rectilinear with offset given:
  > xd = c(1, 2, 4)
  > d = st_dimensions(x = xd, y = 1:3, band = c("foo", "bar"), .raster = c("x", "y"))
  > (st = st_as_stars(array(1:18, c(3,3,2)), dimension = d))
  stars object with 3 dimensions and 1 attribute
  attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max.
  X     1    5.25    9.5  9.5   13.75   18
  dimension(s):
       from to offset delta refsys point              values x/y
  x       1  3     NA    NA     NA FALSE [1,2), [2,4), [4,6) [x]
  y       1  3      1     1     NA FALSE                NULL [y]
  band    1  2     NA    NA     NA FALSE            foo, bar    
  > as.data.frame(st, add_max=FALSE)[1:4,]
      x   y band X
  1 1.5 1.5  foo 1
  2 3.0 1.5  foo 2
  3 5.0 1.5  foo 3
  4 1.5 2.5  foo 4
  > as.data.frame(st, add_max=TRUE)[1:4,]
    x y band x_max y_max X
  1 1 1  foo     2     2 1
  2 2 1  foo     4     2 2
  3 4 1  foo     6     2 3
  4 1 2  foo     2     3 4
  > st_bbox(st)
  xmin ymin xmax ymax 
     1    1    6    4 
  > 
  > # rectilinear with midpoints given:
  > xd = c(1, 2, 4)
  > d = st_dimensions(x = xd, y = 1:3, band = c("foo", "bar"), .raster = c("x", "y"), cell_midpoints = TRUE)
  > (st = st_as_stars(array(1:18, c(3,3,2)), dimension = d))
  stars object with 3 dimensions and 1 attribute
  attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max.
  X     1    5.25    9.5  9.5   13.75   18
  dimension(s):
       from to offset delta refsys point                          values x/y
  x       1  3     NA    NA     NA FALSE [0.5,1.5), [1.5,3.0), [3.0,5.0) [x]
  y       1  3    0.5     1     NA FALSE                            NULL [y]
  band    1  2     NA    NA     NA FALSE                        foo, bar    
  > as.data.frame(st, add_max=FALSE)[1:4,]
       x y band X
  1 1.00 1  foo 1
  2 2.25 1  foo 2
  3 4.00 1  foo 3
  4 1.00 2  foo 4
  > as.data.frame(st, add_max=TRUE)[1:4,]
      x   y band x_max y_max X
  1 0.5 0.5  foo   1.5   1.5 1
  2 1.5 0.5  foo   3.0   1.5 2
  3 3.0 0.5  foo   5.0   1.5 3
  4 0.5 1.5  foo   1.5   2.5 4
  > st_bbox(st)
  xmin ymin xmax ymax 
   0.5  0.5  5.0  3.5 
  > 
  > # rectilinear with midpoints given, point support
  > xd = c(1, 2, 4)
  > d = st_dimensions(x = xd, y = 1:3, band = c("foo", "bar"), .raster = c("x", "y"), cell_midpoints = TRUE, point = TRUE)
  > (st = st_as_stars(array(1:18, c(3,3,2)), dimension = d))
  stars object with 3 dimensions and 1 attribute
  attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max.
  X     1    5.25    9.5  9.5   13.75   18
  dimension(s):
       from to offset delta refsys point   values x/y
  x       1  3     NA    NA     NA  TRUE  1, 2, 4 [x]
  y       1  3    0.5     1     NA  TRUE     NULL [y]
  band    1  2     NA    NA     NA  TRUE foo, bar    
  > as.data.frame(st, add_max=FALSE)[1:4,]
    x y band X
  1 1 1  foo 1
  2 2 1  foo 2
  3 4 1  foo 3
  4 1 2  foo 4
  > as.data.frame(st, add_max=TRUE)[1:4,]
    x   y band x_max y_max X
  1 1 0.5  foo     1   1.5 1
  2 2 0.5  foo     2   1.5 2
  3 4 0.5  foo     4   1.5 3
  4 1 1.5  foo     1   2.5 4
  > st_bbox(st)
  xmin ymin xmax ymax 
   1.0  0.5  4.0  3.5 
  > 
  > # rectilinear with start/end given:
  > #xd = stars:::make_intervals(start = c(1,2,4), end = c(2, 4, 8))
  > xd = c(1, 2, 4, 8) # one more than dim of the data array
  > d = st_dimensions(x = xd, y = 1:3, band = c("foo", "bar"), .raster = c("x", "y"))
  > (st = st_as_stars(array(1:18, c(3,3,2)), dimension = d))
  stars object with 3 dimensions and 1 attribute
  attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max.
  X     1    5.25    9.5  9.5   13.75   18
  dimension(s):
       from to offset delta refsys point              values x/y
  x       1  3     NA    NA     NA FALSE [1,2), [2,4), [4,8) [x]
  y       1  3      1     1     NA FALSE                NULL [y]
  band    1  2     NA    NA     NA FALSE            foo, bar    
  > as.data.frame(st, add_max=FALSE)[1:4,]
      x   y band X
  1 1.5 1.5  foo 1
  2 3.0 1.5  foo 2
  3 6.0 1.5  foo 3
  4 1.5 2.5  foo 4
  > as.data.frame(st, add_max=TRUE)[1:4,]
    x y band x_max y_max X
  1 1 1  foo     2     2 1
  2 2 1  foo     4     2 2
  3 4 1  foo     8     2 3
  4 1 2  foo     2     3 4
  > st_bbox(st)
  xmin ymin xmax ymax 
     1    1    8    4 
  > 
  > # with sfc:
  > sfc = st_sfc(st_point(0:1), st_point(2:1), st_point(4:3))
  > d = st_dimensions(x = sfc, y = 1:3, band = c("foo", "bar"))
  > (st = st_as_stars(array(1:18, c(3,3,2)), dimension = d))
  stars object with 3 dimensions and 1 attribute
  attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max.
  X     1    5.25    9.5  9.5   13.75   18
  dimension(s):
       from to offset delta refsys point                                values
  x       1  3     NA    NA     NA  TRUE POINT (0 1), POINT (2 1), POINT (4 3)
  y       1  3      1     1     NA FALSE                                  NULL
  band    1  2     NA    NA     NA FALSE                              foo, bar
  > as.data.frame(st, add_max=FALSE)[1:4,]
              x y band X
  1 POINT (0 1) 1  foo 1
  2 POINT (2 1) 1  foo 2
  3 POINT (4 3) 1  foo 3
  4 POINT (0 1) 2  foo 4
  > st_as_sf(st, long = TRUE)[1:4,]
  Simple feature collection with 4 features and 3 fields
  Geometry type: POINT
  Dimension:     XY
  Bounding box:  xmin: 0 ymin: 1 xmax: 4 ymax: 3
  CRS:           NA
    y band X           x
  1 1  foo 1 POINT (0 1)
  2 1  foo 2 POINT (2 1)
  3 1  foo 3 POINT (4 3)
  4 2  foo 4 POINT (0 1)
  > st_bbox(st)
  xmin ymin xmax ymax 
     0    1    4    3 
  > 
  > # rotated/sheared:
  > d = st_dimensions(x = 1:3, y = 1:3, band = c("foo", "bar"), .raster = c("x", "y"), affine = c(0.2, -0.2))
  > (st = st_as_stars(array(1:18, c(3,3,2)), dimension = d))
  stars object with 3 dimensions and 1 attribute
  attribute(s):
     Min. 1st Qu. Median Mean 3rd Qu. Max.
  X     1    5.25    9.5  9.5   13.75   18
  dimension(s):
       from to offset delta refsys point   values x/y
  x       1  3      1     1     NA FALSE     NULL [x]
  y       1  3      1     1     NA FALSE     NULL [y]
  band    1  2     NA    NA     NA FALSE foo, bar    
  sheared raster with parameters: 0.2 -0.2 
  > as.data.frame(st, add_max=FALSE)[1:4,]
      x   y X
  1 1.6 1.4 1
  2 2.6 1.2 2
  3 3.6 1.0 3
  4 1.8 2.4 4
  > try(as.data.frame(st, add_max=TRUE)[1:4,]) # errors
  Error in st_coordinates.stars(x, add_max = add_max, center = center) : 
    add_max will not work for rotated/shared rasters
  > st_bbox(st)
  xmin ymin xmax ymax 
   1.0  0.4  4.6  4.0 
  > 
  > # curvilinear:
  > set.seed(13531)
  > lon = st_as_stars(matrix(signif(runif(9), 2), 3, 3))
  > lat = st_as_stars(matrix(signif(runif(9), 2), 3, 3))
  > ll = setNames(c(lon, lat), c("lon", "lat"))
  > d = st_dimensions(lon = 1:3, lat = 1:3)
  > a = st_as_stars(list(X = array(1:9, c(3,3))), dimensions = d)
  > (st = st_as_stars(a, curvilinear = ll))
  Error: evaluation nested too deeply: infinite recursion / options(expressions=)?
  Execution halted