ursa_info: Print metadata for raster image.

ursa_infoR Documentation

Print metadata for raster image.

Description

Function shows information about raster CRS, data type, storage mode, nodata value, structure of band names.

Usage

ursa_info(obj, detail = NA, ...)

Arguments

obj

ursaRaster object

detail

Not used. Reserved for potential detail levels

...

Arguments, which are passed to str.

Details

ursa_info generates a list and then shows structure of this list via function str.

Value

Object of temporal class ursaMetadata is a list with items:

columns

Number of columns (samples)

rows

Number of rows (lines)

resx

Grid cell size by horizontal axis

resy

Grid cell size by vertical axis

minx

Left margin of boundary box

maxx

Right margin of boundary box

miny

Bottom margin of boundary box

maxy

Top margin of boundary box

proj4

PROJ.4 string

nodata

Optional. Value, which is interpreted as NA

datatype

Optional. If data are on disk, then integer code of data type.

interleave

Optional. If data are on disk, then abbreviation of bands interleave.

mode

Character of length 2: storage mode and class of value. If data has not been read, then class is "logical". If data is not in memory, then storage mode is "raw".

bandname

Band names.

colortable

Optional. Structure of color table.

Function returns NULL.

Author(s)

Nikita Platonov platonov@sevin.ru

See Also

str
print.ursaRaster

Examples

session_grid(NULL)
a <- as.integer(round(ursa_dummy(nband=3)))

print(a) ## print data
ursa_info(a,digits=1) ## print metadata

fname <- tempfile()
write_envi(a,fname,compress=FALSE)
b1 <- open_envi(fname)
ursa_info(b1)
close(b1)
b2 <- read_envi(fname)
ursa_info(b2)

# print ENVI header
sapply(c(" -------------- begin --------------",readLines(paste0(fname,".hdr"))
        ," --------------- end ---------------"),message)

envi_remove(fname)

nplatonov/ursa documentation built on May 8, 2024, 6:02 p.m.