gt_RasterLayer-methods: gt_RasterLayer methods

Description Usage Arguments See Also Examples

Description

These are convience wrappers for gt_RasterLayer objects.

Usage

 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)

Arguments

x

gt_RasterLayer object.

See Also

gt_RasterLayer

Examples

 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)

jeffreyhanson/geotrellis documentation built on May 19, 2019, 4 a.m.