- using R version 4.4.3 (2025-02-28 ucrt)
- using platform: x86_64-w64-mingw32
- R was compiled by
gcc.exe (GCC) 13.3.0
GNU Fortran (GCC) 13.3.0
- running under: Windows Server 2022 x64 (build 20348)
- using session charset: UTF-8
- checking for file 'snic/DESCRIPTION' ... OK
- this is package 'snic' version '0.6.0'
- package encoding: UTF-8
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking whether package 'snic' can be installed ... OK
See the install log for details.
- used C compiler: 'gcc.exe (GCC) 13.3.0'
- used C++ compiler: 'g++.exe (GCC) 13.3.0'
- checking installed package size ... NOTE
installed size is 6.1Mb
sub-directories of 1Mb or more:
demo-geotiff 1.3Mb
doc 3.2Mb
- checking package directory ... OK
- checking 'build' directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [0s] OK
- checking whether the package can be loaded with stated dependencies ... [0s] OK
- checking whether the package can be unloaded cleanly ... [0s] OK
- checking whether the namespace can be loaded with stated dependencies ... [0s] OK
- checking whether the namespace can be unloaded cleanly ... [1s] OK
- checking loading without being on the library search path ... [0s] OK
- checking whether startup messages can be suppressed ... [0s] OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [5s] OK
- checking Rd files ... [1s] OK
- checking Rd metadata ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking line endings in C/C++/Fortran sources/headers ... OK
- checking pragmas in C/C++ headers and code ... OK
- checking compiled code ... OK
- checking installed files from 'inst/doc' ... OK
- checking files in 'vignettes' ... OK
- checking examples ... [8s] ERROR
Running examples in 'snic-Ex.R' failed
The error most likely occurred in:
> ### Name: seeds_api
> ### Title: Convert seed coordinates between raster index, map, and WGS84
> ### systems
> ### Aliases: seeds_api as_seeds_rc as_seeds_xy as_seeds_wgs84
>
> ### ** Examples
>
> if (requireNamespace("terra", quietly = TRUE)) {
+ # Load a test Sentinel-2 band
+ s2_file <- system.file(
+ "demo-geotiff/S2_20LMR_B04_20220630.tif",
+ package = "snic"
+ )
+ s2_rast <- terra::rast(s2_file)
+
+ # Create some test coordinates in pixel space
+ seeds_rc <- data.frame(r = c(10, 20, 30), c = c(15, 25, 35))
+
+ # Convert to map coordinates (x,y)
+ seeds_xy <- as_seeds_xy(seeds_rc, s2_rast)
+
+ # Convert to geographic coordinates (lat,lon)
+ seeds_wgs84 <- as_seeds_wgs84(seeds_rc, s2_rast)
+ }
Warning: PROJ: proj_create_from_database: Cannot find proj.db (GDAL error 1)
Error: [project] output crs is not valid
Execution halted
- checking for unstated dependencies in 'tests' ... OK
- checking tests ... [16s] ERROR
Running 'spelling.R' [0s]
Running 'testthat.R' [15s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
> library(testthat)
> library(snic)
>
> test_check("snic")
Saving _problems/test-grid-helpers-216.R
Saving _problems/test-grid-helpers-249.R
Saving _problems/test-grid-helpers-275.R
Saving _problems/test-grid-helpers-303.R
Saving _problems/test-grid-helpers-346.R
Saving _problems/test-plot-140.R
Saving _problems/test-snic-core-56.R
Saving _problems/test-snic-generic-67.R
[ FAIL 8 | WARN 33 | SKIP 0 | PASS 119 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-grid-helpers.R:211:5'): rectangular grids match counts and spacing for arrays and rasters ──
Error in `.wgs84_to_xy.SpatRaster(x, seeds_wgs84)`: .seeds_type(seeds_wgs84) == "wgs84" is not TRUE
Backtrace:
▆
1. └─snic (local) expect_grid_consistency(...) at test-grid-helpers.R:211:5
2. └─snic:::.wgs84_to_rc(imgs$SpatRaster, rast_seeds) at test-grid-helpers.R:72:9
3. ├─snic:::.wgs84_to_xy(x, seeds_wgs84)
4. └─snic:::.wgs84_to_xy.SpatRaster(x, seeds_wgs84)
5. └─base::stopifnot(.seeds_type(seeds_wgs84) == "wgs84")
── Error ('test-grid-helpers.R:244:5'): diamond grids add shifted points while staying within padded bounds ──
Error in `.wgs84_to_xy.SpatRaster(x, seeds_wgs84)`: .seeds_type(seeds_wgs84) == "wgs84" is not TRUE
Backtrace:
▆
1. └─snic (local) expect_grid_consistency(...) at test-grid-helpers.R:244:5
2. └─snic:::.wgs84_to_rc(imgs$SpatRaster, rast_seeds) at test-grid-helpers.R:72:9
3. ├─snic:::.wgs84_to_xy(x, seeds_wgs84)
4. └─snic:::.wgs84_to_xy.SpatRaster(x, seeds_wgs84)
5. └─base::stopifnot(.seeds_type(seeds_wgs84) == "wgs84")
── Error ('test-grid-helpers.R:270:5'): hexagonal grids generate additional offset rows for both backends ──
Error in `.wgs84_to_xy.SpatRaster(x, seeds_wgs84)`: .seeds_type(seeds_wgs84) == "wgs84" is not TRUE
Backtrace:
▆
1. └─snic (local) expect_grid_consistency(...) at test-grid-helpers.R:270:5
2. └─snic:::.wgs84_to_rc(imgs$SpatRaster, rast_seeds) at test-grid-helpers.R:72:9
3. ├─snic:::.wgs84_to_xy(x, seeds_wgs84)
4. └─snic:::.wgs84_to_xy.SpatRaster(x, seeds_wgs84)
5. └─base::stopifnot(.seeds_type(seeds_wgs84) == "wgs84")
── Error ('test-grid-helpers.R:297:5'): random grids are reproducible, unique, and match count estimates ──
Error in `.wgs84_to_xy.SpatRaster(x, seeds_wgs84)`: .seeds_type(seeds_wgs84) == "wgs84" is not TRUE
Backtrace:
▆
1. └─snic (local) expect_grid_consistency(...) at test-grid-helpers.R:297:5
2. └─snic:::.wgs84_to_rc(imgs$SpatRaster, rast_seeds) at test-grid-helpers.R:72:9
3. ├─snic:::.wgs84_to_xy(x, seeds_wgs84)
4. └─snic:::.wgs84_to_xy.SpatRaster(x, seeds_wgs84)
5. └─base::stopifnot(.seeds_type(seeds_wgs84) == "wgs84")
── Error ('test-grid-helpers.R:341:5'): single seed per dimension is centered for both backends ──
Error in `.wgs84_to_xy.SpatRaster(x, seeds_wgs84)`: .seeds_type(seeds_wgs84) == "wgs84" is not TRUE
Backtrace:
▆
1. └─snic (local) expect_grid_consistency(...) at test-grid-helpers.R:341:5
2. └─snic:::.wgs84_to_rc(imgs$SpatRaster, rast_seeds) at test-grid-helpers.R:72:9
3. ├─snic:::.wgs84_to_xy(x, seeds_wgs84)
4. └─snic:::.wgs84_to_xy.SpatRaster(x, seeds_wgs84)
5. └─base::stopifnot(.seeds_type(seeds_wgs84) == "wgs84")
── Error ('test-plot.R:140:9'): seed overlays align for rc, xy, and wgs84 inputs ──
Error: [project] output crs is not valid
Backtrace:
▆
1. └─snic:::.rc_to_wgs84(template, seeds_rc) at test-plot.R:140:9
2. ├─snic:::.xy_to_wgs84(x, seeds_xy)
3. └─snic:::.xy_to_wgs84.SpatRaster(x, seeds_xy)
4. ├─terra::project(v, "EPSG:4326")
5. └─terra::project(v, "EPSG:4326")
6. └─terra (local) .local(x, ...)
7. └─terra:::messages(x, "project")
8. └─terra:::error(f, x@pntr$getError())
── Error ('test-snic-core.R:56:5'): SpatRaster inputs accept WGS84 seeds ───────
Error: [project] input crs is not valid
Backtrace:
▆
1. └─snic:::.rc_to_wgs84(backends$raster, seeds_rc) at test-snic-core.R:56:5
2. ├─snic:::.xy_to_wgs84(x, seeds_xy)
3. └─snic:::.xy_to_wgs84.SpatRaster(x, seeds_xy)
4. ├─terra::project(v, "EPSG:4326")
5. └─terra::project(v, "EPSG:4326")
6. └─terra (local) .local(x, ...)
7. └─terra:::messages(x, "project")
8. └─terra:::error(f, x@pntr$getError())
── Error ('test-snic-generic.R:67:5'): SpatRaster: round-trip conversions with defined CRS (WGS84) are consistent ──
Error: [project] input crs is not valid
Backtrace:
▆
1. ├─snic:::.wgs84_to_rc(rast, .rc_to_wgs84(rast, seeds_rc)) at test-snic-generic.R:67:5
2. │ ├─snic:::.wgs84_to_xy(x, seeds_wgs84)
3. │ └─snic:::.wgs84_to_xy.SpatRaster(x, seeds_wgs84)
4. │ ├─base::stopifnot(.seeds_type(seeds_wgs84) == "wgs84")
5. │ └─snic:::.seeds_type(seeds_wgs84)
6. │ ├─c("r", "c") %in% colnames(seeds)
7. │ └─base::colnames(seeds)
8. │ └─base::is.data.frame(x)
9. └─snic:::.rc_to_wgs84(rast, seeds_rc)
10. ├─snic:::.xy_to_wgs84(x, seeds_xy)
11. └─snic:::.xy_to_wgs84.SpatRaster(x, seeds_xy)
12. ├─terra::project(v, "EPSG:4326")
13. └─terra::project(v, "EPSG:4326")
14. └─terra (local) .local(x, ...)
15. └─terra:::messages(x, "project")
16. └─terra:::error(f, x@pntr$getError())
[ FAIL 8 | WARN 33 | SKIP 0 | PASS 119 ]
Error:
! Test failures.
Execution halted
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [98s] ERROR
Error(s) in re-building vignettes:
--- re-building 'snic-array-pipeline.Rmd' using rmarkdown
--- finished re-building 'snic-array-pipeline.Rmd'
--- re-building 'snic-spatraster-pipeline.Rmd' using rmarkdown
Quitting from snic-spatraster-pipeline.Rmd:70-74 [seeds]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error:
! [project] output crs is not valid
---
Backtrace:
▆
1. └─snic::snic_grid(s2, type = "rectangular", spacing = 24, padding = 2)
2. └─snic:::.rc_to_wgs84(x, seeds)
3. ├─snic:::.xy_to_wgs84(x, seeds_xy)
4. └─snic:::.xy_to_wgs84.SpatRaster(x, seeds_xy)
5. ├─terra::project(v, "EPSG:4326")
6. └─terra::project(v, "EPSG:4326")
7. └─terra (local) .local(x, ...)
8. └─terra:::messages(x, "project")
9. └─terra:::error(f, x@pntr$getError())
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: processing vignette 'snic-spatraster-pipeline.Rmd' failed with diagnostics:
[project] output crs is not valid
--- failed re-building 'snic-spatraster-pipeline.Rmd'
SUMMARY: processing the following file failed:
'snic-spatraster-pipeline.Rmd'
Error: Vignette re-building failed.
Execution halted
- checking PDF version of manual ... [19s] OK
- checking HTML version of manual ... [4s] OK
- DONE
Status: 3 ERRORs, 1 NOTE