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
Note it does write a "foo.vrt" file without the source information we get with vrt(x, filename = "foo2.vrt")
So, after crash in a new session we get:
terra::rast("foo.vrt")
#> class : SpatRaster #> dimensions : 90, 95, 1 (nrow, ncol, nlyr)#> resolution : 0.008333333, 0.008333333 (x, y)#> extent : 5.741667, 6.533333, 49.44167, 50.19167 (xmin, xmax, ymin, ymax)#> coord. ref. : lon/lat WGS 84 (EPSG:4326) #> source : foo.vrt #> name : elevation #> min value : 0 #> max value : 0
I figure writeRaster(..., filetype="VRT") is not something folks often try to do, but to avoid a crash the specific value of filetype="VRT" could have an error message that directs the user to to vrt(), or, alternately, passes terra::sources(x) to vrt() and errors for x that exists only in memory.
The text was updated successfully, but these errors were encountered:
I stumbled across this case when working on #1714. Setting
filetype="VRT"
withwriteRaster()
crashes R.Note it does write a "foo.vrt" file without the source information we get with
vrt(x, filename = "foo2.vrt")
So, after crash in a new session we get:
I figure
writeRaster(..., filetype="VRT")
is not something folks often try to do, but to avoid a crash the specific value offiletype="VRT"
could have an error message that directs the user to tovrt()
, or, alternately, passesterra::sources(x)
tovrt()
and errors forx
that exists only in memory.The text was updated successfully, but these errors were encountered: