[R-sig-Geo] rgdal::writeGDAL temporary files
Oliver Soong
osoong+r at gmail.com
Wed Sep 19 23:17:04 CEST 2012
I'm processing and outputting a large number of large GeoTIFFs. Every
time I write one, I get a new intermediate file in tempdir(). I do
not have enough space in my temporary folder to store all of these
intermediates. I believe these intermediate files back the
GDALTransientDataset objects created by create2GDAL called from
writeGDAL (I think), which are then copied to a data drive by
saveDataset. After saveDataset, though, the transient object is
orphaned.
Is it possible to tell rgdal to remove these transients after
writing/saveDataset? Alternatively, is it possible to tell rgdal to
write these intermediates to a particular location?
I can think of two workarounds, but I'd love to hear better ideas. I
could redirect R's tempdir, although this is rather inconvenient. I
can also try to detect the temporary files and delete them manually,
although this is probably driver- and version-specific and so less
robust than I would prefer.
Cheers,
Oliver
More information about the R-sig-Geo
mailing list