blank | R Documentation |
Set of functions for checking is any or all bands have no data, and for retrieving indices for non-data bands.
band_blank(obj, ref = c("any", "0", "NA"), verbose = FALSE)
ursa_blank(obj, ref)
obj |
Object of class |
ref |
Character. Definition criteria, what is blank mean. If value |
verbose |
Logical. Value |
It is defined locally that if all values of band are NA
or 0 (see description to argument ref
), then such band is blank. The fact is ursa_new
create new object in memory with default values NA
, but create_envi
writes zeros to disk quick. It is decided to consider both these cases as blank. Function band_blank
checks blanks for each band of image. If all bands are blank then function ursa_blank
returns TRUE
.
Function ursa_blank
returns logical value of length 1.
Function band_blank
returns logical value of length nband(obj)
.
Nikita Platonov platonov@sevin.ru
is.na
returns object of class ursaRaster
; it is mask of cells, which have NA
value.
session_grid(NULL)
a <- ursa_new(bandname=c("first","second","third","fourth"))
ursa_value(a,"first") <- 0 ## 'a[1] <- 1' works, but it is slow
print(ursa_blank(a))
a[3] <- pixelsize()
a[4] <- a[3]>625
print(a)
print(band_blank(a))
print(which(band_blank(a)))
print(ursa_blank(a))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.