pvts_cd: Change detection using PVts series

Description Usage Arguments Examples

Description

Estimate the change detection considering the mean and sd and a disturbance threshold

Usage

1
pvts_cd(mean, std, Rc, threshold = 5, RasterLayer = TRUE)

Arguments

mean

filename(character), Raster* or star object (see read_stars); represent the spatial mean.

std

filename(character), Raster* or star object (see read_stars); represent the spatial standard deviation.

Rc

filename(character), Raster* or star object (see read_stars); image to compare the change.

threshold

logical; if TRUE, negative values are replace by NA.

RasterLayer

logical; if TRUE, return a RasterLayer object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(stars)
library(raster)
library(PVts)

data(pvts_datasets)
x = pvts_datasets$PVts[,1:50,1:50]

# estimate the mean and std of the first 15 years (1990-2004)
mean_std = pvts_meanstd(x[1:15])
# Get the disturbance of 2018.
compare = as(x[28,1:50,1:50],'Raster')
compare[compare<0]=NA
pvts_cd(mean_std[[1]],mean_std[[2]],compare)

pvts-approach/PVts documentation built on July 1, 2019, 4:59 p.m.