| ursa_new | R Documentation |
ursa_new creates object of class ursaRaster in memory using session grid parameters or properties of input object (matrix or array). By option, band names and ignore values are specified.
ursa_new(...)
... |
Set of arguments, which are recognized via their names (using regular expressions) and classes:
|
ursa_new creates ursaRaster object in memory. To manipulate with raster chunks use the followed construction:
a <- create_envi(fname,...) a[condition_1] <- value print(a[condition_2] ... close(a)
ursa_new is designed to create blank raster images. Use as.ursa for conversion R objects to ursaRaster.
Object of class ursaRaster.
Nikita Platonov platonov@sev-in.ru
as.ursa, create_envi.
session_grid(NULL)
a1 <- ursa_new(volcano)
print(a1)
## to avoid over-timing during tests -- begin
display(a1)
## to avoid over-timing during tests -- end
a2 <- ursa_new(volcano,flip=TRUE)
print(a2)
## to avoid over-timing during tests -- begin
display(a2)
## to avoid over-timing during tests -- end
a3 <- ursa_new(volcano,permute=TRUE)
print(a3)
## to avoid over-timing during tests -- begin
display(a3)
## to avoid over-timing during tests -- end
dima <- c(200,300,4)
b1 <- as.ursa(array(runif(prod(dima)),dim=dima))
print(b1)
display_brick(b1,scale=1,pal=c("white","black"),decor=FALSE)
session_grid(NULL)
c1 <- ursa_new(seq(3))
print(c1)
c2 <- ursa_new(seq(3),bands=3)
print(c2)
c3 <- ursa_new(value=FALSE)
str(ursa_value(c3))
c4 <- ursa_new(bands=2,nodata=-99L)
print(c4)
print(ignorevalue(c4))
c5 <- ursa_new(bandname=format(Sys.Date()+seq(7)-1,"%A"))
ursa_value(c5) <- rev(seq(nband(c5)))
c5 <- colorize(c5)
ct <- ursa_colortable(c5)
print(c5)
v <- ursa_value(c5[3:5])
str(v)
v <- c(v)
str(v)
c6 <- ursa_new(v,colortable=ct)
print(c6)
print(ursa_colortable(c6))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.