File tree Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -564,10 +564,6 @@ CRS: NA
564564
565565Attaching package: 'dplyr'
566566
567- The following object is masked from 'package:testthat':
568-
569- matches
570-
571567The following objects are masked from 'package:stats':
572568
573569 filter, lag
@@ -1144,4 +1140,4 @@ Geodetic CRS: WGS 84
11441140>
11451141> proc.time()
11461142 user system elapsed
1147- 5.480 1.465 5.555
1143+ 5.292 1.417 5.383
Original file line number Diff line number Diff line change @@ -76,20 +76,23 @@ crs <- gdal_crs(tif)
7676try(gdal_metadata(" foo" ))
7777gdal_metadata(tif )
7878
79+ suppressMessages(
80+ suppressWarnings(
7981if (require(stars , quietly = TRUE )) {
8082 p = normalizePath(system.file(" nc/ones.zarr.zip" , package = " sf" ))
8183 z = paste0(' ZARR:/vsizip/"' , p , ' "/ones.zarr' )
82- d = try(gdal_utils(" mdiminfo" , z ))
84+ d = try(gdal_utils(" mdiminfo" , z ), silent = TRUE )
8385 if (! inherits(d , " try-error" )) {
8486 print(d )
8587 cat(" \n " )
8688 }
8789 e = try(read_stars(z , normalize_path = FALSE ), silent = TRUE )
8890 f = try(read_mdim(z , normalize_path = FALSE ), silent = TRUE )
8991 if (inherits(e , " try-error" ) || inherits(f , " try-error" )) {
90- print(" error when reading blosc-compressed Zarr file: blosc not supported?" )
92+ print(" Cannot read blosc-compressed Zarr file: blosc not supported?" )
9193 } else {
9294 print(e )
9395 print(f )
9496 }
9597}
98+ ))
Original file line number Diff line number Diff line change @@ -259,23 +259,26 @@ First 10 features:
259259> gdal_metadata(tif)
260260[1] "AREA_OR_POINT=Point"
261261>
262- > if (require(stars, quietly = TRUE)) {
262+ > suppressMessages(
263+ + suppressWarnings(
264+ + if (require(stars, quietly = TRUE)) {
263265+ p = normalizePath(system.file("nc/ones.zarr.zip", package = "sf"))
264266+ z = paste0('ZARR:/vsizip/"', p, '"/ones.zarr')
265- + d = try(gdal_utils("mdiminfo", z))
267+ + d = try(gdal_utils("mdiminfo", z), silent = TRUE )
266268+ if (!inherits(d, "try-error")) {
267269+ print(d)
268270+ cat("\n")
269271+ }
270272+ e = try(read_stars(z, normalize_path = FALSE), silent = TRUE)
271273+ f = try(read_mdim(z, normalize_path = FALSE), silent = TRUE)
272274+ if (inherits(e, "try-error") || inherits(f, "try-error")) {
273- + print("error when reading blosc-compressed Zarr file: blosc not supported?")
275+ + print("Cannot read blosc-compressed Zarr file: blosc not supported?")
274276+ } else {
275277+ print(e)
276278+ print(f)
277279+ }
278280+ }
281+ + ))
279282{
280283 "type": "group",
281284 "driver": "Zarr",
@@ -330,4 +333,4 @@ dim0 1 100 0.5 1 [y]
330333>
331334> proc.time()
332335 user system elapsed
333- 2.402 4.034 2.082
336+ 1.948 4.046 1.515
You can’t perform that action at this time.
0 commit comments