gt_aggregate: Aggregate geotrellis raster data

Description Usage Arguments Examples

Description

This function aggregates geotrellis raster layer data gt_RasterLayer.

Usage

1

Arguments

x

gt_RasterLayer object.

fact

integer Aggregation factor expressed as number of cells in each direction.

fun

character name of function used to aggregate values. Available functions are 'mean', 'mode', 'median', 'max', and 'min'. Defaults to 'mean'.

Examples

1
2
3
4
5
6
7
## 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))
result <- gt_aggregate(g, fact=2, fun='mean')

## End(Not run)

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