calculatePredictors: Calculate predictors from MSG cloud masked data

Description Usage Arguments Author(s) Examples

Description

Calculate predictors from MSG cloud masked data

Usage

1
2
3
4
calculatePredictors(scenerasters, model = NULL, useOptimal = TRUE,
  spectral = NULL, sunzenith = NULL, texture = NULL, pptext = NULL,
  zonstat = NULL, filterstat = NULL, shape = NULL, min_x = NULL,
  max_x = NULL, further = c("sunzenith", "jday"), date)

Arguments

scenerasters

A raster stack of cloud masked MSG scenes with non clouded areas were set to NA

model

A rfe object Optional. Can be used instad of the spectral,texture, pptext,zonstat,shape parameters. Variables included in the optimal model are the calculated.

useOptimal

if is.null(model): Logical. Use the optimal variables from rfe or those less variables which lead to a model performance within one sd of the optimal model?

spectral

A character vector indicating the msg channels to be included. Possible values: "VIS0.6","VIS0.8","NIR1.6","IR3.9","WV6.2","WV7.3","IR8.7", "IR9.7","IR10.8","IR12.0","IR13.4","T0.6_1.6","T6.2_10.8","T7.3_12.0", "T8.7_10.8","T10.8_12.0", "T3.9_7.3","T3.9_10.8"

sunzenith

A raster of the sun zenith values

texture

data frame of all spectral and texture combinations ("mean", "variance", "homogeneity", "contrast", "dissimilarity", "entropy","second_moment") and filter sizes which are to be calculated. (Tip: Use expand.grid to create this data.frame)

pptext

data frame of all spectral and texture combinations which are to be calculated for teh overall cloud entity. (Tip: Use expand.grid to create this data.frame)

zonstat

data frame of all spectral and zonal stat ("mean","min","max","sd") combinations (min,max,mean or sd) which are to be calculated for the overall cloud entity. (Tip: Use expand.grid to create this data.frame)

filterstat

data.frame of all spectral and "mean","min","max","sd" and filter size combinations

shape

geoemtry variables which should be included. Possible values are "Ar",SI","CA","Ur","CAI","PAR","distEdges","Re","Ru","OIC", CI1","CO1","CI2","CO2","CCI1","CCI2","CO","SHD","C1","E", "TR","CR","C2","FR","EI","SF1","GSI","SF2","C3","SF3"

further

a character vector including Currently "jday" and/or "sunzenith" which will also be used as variables. see geometryVariables and borgIndices for description of the variables.

date

Date of the msg scene in format yyyymmddhhmm. Only imprtant if the day of the year (jday) is calculated (see param "further").

x_min

see textureVariables

x_max

see textureVariables

Author(s)

Hanna Meyer

Examples

 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
27
28
29
30
31
32
33
34
############################################################################
#Example 1: Predictors from predictor list
############################################################################ 
# stack the msg scenes:
msg_example <-getChannels(inpath=system.file("extdata/msg",package="Rainfall"))

# raster the sunzenith 
sunzenith<-getSunzenith(inpath=system.file("extdata/msg",package="Rainfall"))

#get Date
date <- getDate(system.file("extdata/msg",package="Rainfall"))

#calculate variables (takes some time...)
pred <- calculatePredictors(msg_example,
sunzenith=sunzenith,
spectral=c("VIS0.6","VIS0.8","NIR1.6","T0.6_1.6","T6.2_10.8"),
texture=expand.grid(c("NIR1.6","T6.2_10.8"),
c("variance", "contrast"),c(3,9)),
pptext=expand.grid("T3.9_10.8",c("variance","mean")),
shape=c("Ar","CAI","SI","CI1"),
filterstat=expand.grid(c("VIS0.6","T6.2_10.8"),
c("min", "max"),c(3,9)),
zonstat=data.frame("spec"=c("VIS0.8","VIS0.8","T6.2_10.8"),
"var"=c("min","sd","max")),
date=date)
print(pred)
############################################################################
#Example 2:calculate predictors from an rfe model
############################################################################
#'  # stack the msg scenes:
msg_example <-getChannels(inpath=system.file("extdata/msg",package="Rainfall"))

data(rfeModel)
pred<-calculatePredictors(msg_example,model=rfeModel,date=NULL,sunzenith=NULL)

environmentalinformatics-marburg/Rainfall documentation built on May 16, 2019, 7:49 a.m.