Description Usage Arguments See Also Examples
These are convience wrappers for gt_RasterLayer
objects.
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 | ## S4 method for signature 'gt_RasterLayer'
crs(x)
## S4 method for signature 'gt_RasterLayer'
ncell(x)
## S4 method for signature 'gt_RasterLayer'
values(x)
## S4 method for signature 'gt_RasterLayer'
res(x)
## S4 method for signature 'gt_RasterLayer'
extent(x)
## S4 method for signature 'gt_RasterLayer'
ncol(x)
## S4 method for signature 'gt_RasterLayer'
nrow(x)
## S4 method for signature 'gt_RasterLayer'
as.matrix(x)
## S4 method for signature 'gt_RasterLayer'
as.raster(x)
|
x |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
g <- gt_raster(raster::raster(matrix(runif(9), ncol=3),
crs=sp::CRS('+init=epsg:4326'),
xmn=0, xmx=3, ymn=2, ymx=10))
ncell(g) # number of cells
ncol(g) # number of columns
nrow(g) # number of rows
nrow(g) # number of rows
crs(g) # coordinate reference system
res(g) # cell resolution
extent(g) # spatial extent
as.matrix(g) # coerce data to matrix object
as.raster(g) # coerce data to matrix object
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.