write_envi | R Documentation |
write_envi
writes in-memory object of class ursaRaster
to disk in the ENVI .hdr Labelled Raster file format.
write_envi(obj, ...)
obj |
Object of class |
... |
Arguments, which are passed to |
write_envi
implements writing the whole ursaRaster
object to disk. For multiple access to disk (by chunks), use followed construction:
a <- create_envi(fname) a[condition_1] <- value1 a[condition_2] <- value2 ... close(a)
Integer code of ENVI data type. See values of the “data type” field in description of the ENVI Header Format.
Nikita Platonov platonov@sevin.ru
create_envi
, Replace method [<-
for ursaRaster
object, close_envi
(close
for ursaRaster
object).
write_gdal(...,driver="ENVI")
uses GDAL (rgdal) for writing ursaRaster
object to the ENVI .hdr Labelled Raster file.
session_grid(NULL)
dir.create(tmpWD <- file.path(tempdir(),"certain"))
wd <- setwd(tmpWD)
print(c('temp dir'=session_tempdir(),'working dir'=getwd()))
list1a <- envi_list(session_tempdir())
list1b <- envi_list()
fname <- tempfile(tmpdir=".")
a <- ursa_dummy()
bandname(a) <- c("first","second","third")
write_envi(a)
write_envi(a,fname)
list2a <- envi_list(session_tempdir())
list2b <- envi_list()
fname1 <- list2a[!(list2a %in% list1a)]
fname2 <- list2b[!(list2b %in% list1b)]
print(c('in temp dir'=fname1,'in working dir'=fname2))
a2 <- open_envi(fname1)
print(a2)
close(a2)
envi_remove(c(fname1,fname2))
setwd(wd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.