get_change_raster: Get difference between two rasters

Description Usage Arguments Value Examples

View source: R/get_change_raster.R

Description

Function will take a RasterStack or RasterBrick object with two layers and return a raster where the cells that have changed between the two layers have value of 1. If the raster data has temporal aspect, then the raster_input[[1]] is t1 timestep, while raster_input[[2]] is t2 timestep. Since the two raster objects should match, the passed variable has to be RasterStack or RasterBrick (RasterStack will be converted to RasterBrick, therefore it might be more economical to work with RasterBrick as an input here). Values for the change is observed can be clamped. For example, when applying the function to the ESA CCI LC data, if you only want to extract changes of agriculture, then category argument can have values of agricultural classes (eg. category = 10:40).

Usage

1
get_change_raster(input_raster, filename, category, return_raster = TRUE)

Arguments

filename

Output file. Full path with .tif extension. If missing, temporary file will be created (file sizes may get large).

category

Land cover category to extract.

return_raster

Logical. The function stores the raster in the filename argument path as a side-effect. If return_raster = TRUE (default), then the function returns the stored raster.

raster_input

RasterStack or RasterBrick of t1 and t2 timestep.

Value

Binary raster with 1 values as changes. Only if return_raster = TRUE. Otherwise, the function side-effect is to save the file locally.

Examples

1
None yet.

MirzaCengic/LUpak documentation built on July 18, 2019, 3:06 a.m.