ignorevalue {ursa}R Documentation

Extract and assign ‘nodata’ value of raster images.

Description

Ignored values (aka 'nodata') are implemented via NA values, and are optional for raster images in memory. However, to avoid ambiguity for data storage, it is desirable to specify ignored value. “ENVI .hdr Labelled Raster” supports ‘nodata’ by means of “data ignore value” field in the header file.

Usage

ignorevalue(obj)
ursa_nodata(obj)

ignorevalue(obj) <- value
ursa_nodata(obj) <- value

Arguments

obj

ursaRaster object.

value

Integer of numeric of length one. Ignored (‘nodata’) value.

Details

ursa_nodata is synonym to ignorevalue for both Extract and Replace methods.

The ‘nodata’ value of raster image obj is specified in the item obj$con$nodata.

If values of raster image are in memory then replace function ignorevalue<- also changes ‘nodata’ values to NA values.

Value

Extract function ignorevalue returns value of $con$nodata item of ursaRaster object.

Replace function ignorevalue<- returns ursaRaster with modified $con$nodata item.

Author(s)

Nikita Platonov platonov@sevin.ru

Examples

session_grid(NULL)
a <- round(ursa_dummy(nband=1,min=0.500001,max=4.499999))
print(a)
print(as.table(a))
print(ignorevalue(a))
ignorevalue(a) <- NA
print(as.table(a))
print(ignorevalue(a))
ignorevalue(a) <- 4
print(as.table(a))
print(ignorevalue(a))
print(a)

[Package ursa version 3.10.4 Index]