lucC_pred_holds: Predicate Allen Holds

Description Usage Arguments Value Author(s) Examples

View source: R/lucC_predicates_raster.R

Description

Provide a predicate HOLDS which evaluates as true when a class c_i, e.g. 'Forest', holds uring the interval t_i. Return a matrix with values within defined interval

Usage

1
2
3
lucC_pred_holds (raster_obj = NULL, raster_class = NULL,
time_interval = c("2000-01-01", "2004-01-01"),
relation_interval = "contains", label = NULL, timeline = NULL)

Arguments

raster_obj

Raster. A raster brick with classified images

raster_class

Character. Name of the class of interest, such as 'Forest', to research

time_interval

Interval. A time interval to verify if class is over or not

relation_interval

Character. If a location HOLDS during all time interval 'equals' or can be appear in any times 'contains'. Default is 'contains'

label

Character Vector. All labels of each value of pixel from classified raster

timeline

Character. A list of all dates of classified raster, timeline

Value

Matrix with all states which holds during a time interval

Author(s)

Adeline M. Maciel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
library(lucCalculus)

file <- c(system.file("extdata/raster/rasterSample.tif", package = "lucCalculus"))
rb_class <- raster::brick(file)
my_label <- c("Degradation", "Fallow_Cotton", "Forest", "Pasture", "Soy_Corn", "Soy_Cotton",
              "Soy_Fallow", "Soy_Millet", "Soy_Sunflower", "Sugarcane", "Urban_Area", "Water")
my_timeline <- c("2001-09-01", "2002-09-01", "2003-09-01", "2004-09-01", "2005-09-01",
                 "2006-09-01", "2007-09-01", "2008-09-01", "2009-09-01", "2010-09-01",
                 "2011-09-01", "2012-09-01", "2013-09-01", "2014-09-01", "2015-09-01",
                 "2016-09-01")

a <- lucC_pred_holds(raster_obj = rb_class, raster_class = c("Pasture"),
                     time_interval = c("2007-09-01","2010-09-01"),
                     relation_interval = "contains", label = my_label,
                     timeline = my_timeline)
a


## End(Not run)

ammaciel/lucCalculus documentation built on June 13, 2020, 4:57 a.m.