createComparableCDL: Create comparable raster images

Description Usage Arguments Value Author(s) Examples

View source: R/createComparableCDL.R

Description

createComparableCDL uses a base index within a raster list, and sets all other raster images within the list to the same resolution, projection, and extent. The raster function resample is used to tranform raster images, therefore this function may be quite slow without tuning.

Usage

1
createComparableCDL(rasterList, filenames, baseIndex, progress = "")

Arguments

rasterList

A list of raster images.

filenames

An array of file names of raster images to coerce into a raster list, if rasterList is not provided.

baseIndex

The index of the raster list element that all other elements will match with respect to resolution, projection and extent.

progress

A string for the raster progress bar type, default "" is none, "text" provides text output, "window" provides a gui window if available.

Value

A list of raster images matching in extent, resolution, and projection.

Author(s)

Jonathan Lisic, jlisic@gmail.com

Examples

1
2
3
4
5
6
7
## Not run: 
# download multiple years of Iowa Data
r <- getCDL('iowa',c(2006,2010))
# resample based on the 2006
r2 <- createComparableCDL(r,baseIndex=1)

## End(Not run)

cdlTools documentation built on July 2, 2020, 1:51 a.m.