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)
Object of class
Character. Definition criteria, what is blank mean. If 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
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 logical value of length 1.
band_blank returns logical value of length
Nikita Platonov email@example.com
is.na returns object of class
ursaRaster; it is mask of cells, which have
session_grid(NULL) a <- ursa_new(bandname=c("first","second","third","fourth")) ursa_value(a,"first") <- 0 ## 'a <- 1' works, but it is slow print(ursa_blank(a)) a <- pixelsize() a <- a>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.