create_envi {ursa}R Documentation

Create ENVI or GDAL files on disk

Description

create_envi creates ENVI binary and header files on disk. ENVI binary file is filled by blank (zero) values.
create_gdal is just an entry for GDAL wrapper; currently via internal ENVI implementation.

Usage

create_gdal(x, ...)

create_envi(x, ...)

Arguments

x

Filename, or any refenerce object to help assign properties of new ENVI file. Can be missed.

...

Use name = value sequence. Properties of new ENVI file are extracted from keywords in 'name' and data types of 'value'.

Details

Prior ursa version < 3.10, create_gdal() used classes and methods from package rgdal. Currenty, alternatives are not found for complete replacement of rgdal. At the present, ENVI binary and header are created, firstly, and close() transforms to desired GDAL format, finally.

create_envi and create_gdal use parameters of grid (boundary box, cell size, projection) from reference object of class ursaRaster in argument x or calls session_grid. You may specify values of GDAL or ENVI binary file later using [<-. If x is object of class ursaRaster then metadata parameters (interleave, data type, ignore value, etc) are inherited.

Keywords:

If file name is unknown, then random file name is used with informing via message().

Value

Object of class ursaRaster with opened connection of GDAL or ENVI binary file.

Author(s)

Nikita Platonov platonov@sevin.ru

See Also

ursa_new creates object of class ursaRaster in memory and allows to assign values at once.

Use session_grid to check or specify parameters of grid before calling create_envi.

Use [<- to assign values to ENVI binary file after calling create_envi.

Use close (or close_envi) to close connections.

Examples

session_grid(NULL)
a <- create_envi()
fname <- a$con$fname
dir(pattern=basename(envi_list(fname)))
close(a)
invisible(envi_remove(fname))

a <- create_envi("exam1",layername=paste("Band",1:5)
                ,ignorevalue=99,datatype="Int16",interleave="bil")
ursa_info(a)
print(a[])
close(a)
invisible(envi_remove("exam1"))

[Package ursa version 3.10.4 Index]