You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expansion of tilde ~ into the home directory path doesn't work with write_stars (unlike read_stars, sf::st_read and sf::st_write, where tilde expansion works fine).
For example:
library(stars)
tif= system.file("tif/L7_ETMs.tif", package="stars")
x= read_stars(tif)
write_stars(x, "~/Downloads/x.tif")
## Error in CPL_write_gdal(mat, file, driver, options, type, dims, from, : ## creating dataset failed## In addition: Warning message:## In CPL_write_gdal(mat, file, driver, options, type, dims, from, :## GDAL Error 4: Attempt to create new tiff file `~/Downloads/x.tif' failed: No such file or directory
However, this does work:
write_stars(x, "/home/michael/Downloads/x.tif")
Session information:
R version 4.0.0 (2020-04-24)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.4 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/atlas/libblas.so.3.10.3
LAPACK: /usr/lib/x86_64-linux-gnu/atlas/liblapack.so.3.10.3
locale:
[1] LC_CTYPE=en_IL LC_NUMERIC=C LC_TIME=en_IL
[4] LC_COLLATE=en_IL LC_MONETARY=en_IL LC_MESSAGES=en_IL
[7] LC_PAPER=en_IL LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_IL LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] stars_0.4-2 sf_0.9-3 abind_1.4-5
loaded via a namespace (and not attached):
[1] compiler_4.0.0 magrittr_1.5 class_7.3-17 parallel_4.0.0
[5] tools_4.0.0 DBI_1.1.0 units_0.6-6 Rcpp_1.0.4.6
[9] KernSmooth_2.23-17 grid_4.0.0 e1071_1.7-3 lwgeom_0.2-4
[13] classInt_0.4-3 rlang_0.4.6
>
Thanks!
The text was updated successfully, but these errors were encountered:
Expansion of tilde
~
into the home directory path doesn't work withwrite_stars
(unlikeread_stars
,sf::st_read
andsf::st_write
, where tilde expansion works fine).For example:
However, this does work:
Session information:
Thanks!
The text was updated successfully, but these errors were encountered: