read_envi | R Documentation |
Reads all or several bands of ENVI .hdr Labelled Raster file from disk to memory.
read_envi(fname, ...)
fname |
Character. Filename for ENVI .hdr Labelled Raster file. |
... |
For
|
Function read_envi
is designed to one-time reading (from disk to memory) ENVI .hdr Labelled Raster file. For multiple access to disk (by chunks), use followed construction:
a <- open_envi(fname) d1 <- a[condition_1] d2 <- a[condition_2] ... close(a)
In this case, the connection keeps open. The gain is more effective for compressed binary files.
Object of class ursaRaster
.
Nikita Platonov platonov@sevin.ru
open_envi
, Extract method [
for ursaRaster
object, close_envi
.
read_gdal
uses GDAL (rgdal) to read ENVI .hdr Labelled Raster file.
session_grid(NULL)
fname <- tempfile()
a <- ursa_dummy()
bandname(a) <- c("first","second","third")
write_envi(a,fname,compress=FALSE)
print(read_envi(fname))
print(read_envi(fname,c(1,3)))
print(read_envi(fname,-c(1,3)))
print(read_envi(fname,c("first","third")))
print(read_envi(fname,"iR"))
print(session_grid())
g <- regrid(session_grid(),mul=1/2.3)
b <- read_envi(fname,ref=g)
print(session_grid())
print(b)
envi_remove(fname)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.