Description Usage Arguments Details Value Author(s) See Also Examples
For package description see.
ursa is a wrapper to initialize object of class ursaRaster, to get and to set properties for this object.
1 2 |
obj |
Any numeric structure (scalar, matrix, array) for initializing. Object of class |
attr |
Character. Name of property. |
... |
Arguments, which are passed for properties specification. |
value |
Value for property assignment. |
Initializing function ursa with missing argument attr is a wrapper for function as.ursa.
| Matched pattern | Replace method? | Description of property | Implementation |
"grid" | Yes | Raster grid (extent, projection, cellsize) | ursa_grid
|
"(proj|crs)" | Yes | Coordinate reference system | ursa_proj
|
"val" | Yes | Raster value in the internal storage format | ursa_value
|
"(colort|ct)" | Yes | Color table | ursa_colortable
|
"(categ|class)" | Yes | Names of categories | names(ursa_colortable(obj))
|
"name" | Yes | Band names | names
|
"(nodata|ignorevalue|bg)" | Yes | Value, which is interpreted as NA. | ignorevalue
|
"^table$" | No | Frequency of unique values | as.table
|
"cell" | No | Squared cell size | with(ursa_grid(obj),sqrt(resx*resy))
|
"^dim$" | No | Dimension of raster image | dim
|
"(extent|bbox)" | No | Spatial extent of raster image | with(ursa_grid(obj),c(xmin=minx,ymin=miny,xmax=maxx,ymax=maxy))
|
"(nrow|rows|lines)" | No | Number of rows of raster image | ursa_grid(obj)$rows
|
"(ncol|columns|samples)" | No | Number of columns of raster image | ursa_grid(obj)$columns
|
"con" | No | structure of connection | obj$con
|
"(info|meta(data)*)" | No | Metadata, brief info | ursa_info
|
"^file(name)*" | No | Connection name (filename) | obj$con$fname
|
Argument ... is used to specify band index or band pattern in ursa(obj,"value",...)
Inititalizing function ursa (missing attr) returns object of class ursaRaster.
Extract function ursa returns object of respective property.
Replace function ursa<- returns object
Nikita Platonov platonov@sevin.ru
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | a1 <- ursa(volcano)
print(a1)
display(a1)
a2 <- ursa(volcano,flip=TRUE)
print(a2)
display(a2)
a3 <- ursa(volcano,permute=TRUE)
print(a3)
display(a3)
a4 <- ursa(volcano,flip=TRUE,permute=TRUE)
print(a4)
display(a4)
dima <- c(200,300,4)
b1 <- ursa(array(runif(prod(dima)),dim=dima))
print(b1)
display_brick(b1,scale=1,pal.rotate=0,pal.hue=0,decor=FALSE)
session_grid(NULL)
c1 <- ursa(seq(3))
print(c1)
c2 <- ursa(seq(3),bands=3)
print(c2)
c3 <- ursa(value=FALSE)
str(ursa(c3,"value"))
c4 <- ursa(bands=2,nodata=-99L)
print(c4)
print(ursa(c4,"nodata"))
c5 <- ursa(bandname=format(Sys.Date()+seq(7)-1,"%A"))
ursa(c5,"value") <- rev(seq(nband(c5)))
c5 <- colorize(c5)
ct <- ursa(c5,"colortable")
print(c5)
v <- ursa(c5[3:5],"value")
str(v)
v <- c(v)
str(v)
c6 <- ursa(v,colortable=ct)
print(c6)
print(ursa(c6,"colortable"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.