plotDistance: Plotting distance maps

Description Usage Arguments Value Author(s) See Also Examples

Description

Method for plotting TWDTW distance maps.

Usage

1
plotDistance(x, time.levels = 1, time.labels = 1, layers = NULL)

Arguments

x

An object of class twdtwRaster.

time.levels

A character or numeric vector with the layers to plot. For plot type ”change” the minimum length is two.

time.labels

A character or numeric vector with the labels of the layers. It must have the same length as time.levels. Default is NULL.

layers

A character or numeric vector with the layers/bands of the raster time series.

Value

A ggplot object.

Author(s)

Victor Maus, vwmaus1@gmail.com

See Also

twdtwRaster-class, twdtwApply, plotArea, plotChanges, and plotDistance.

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
## Not run: 
# Run TWDTW analysis for raster time series 
patt = MOD13Q1.MT.yearly.patterns
evi = brick(system.file("lucc_MT/data/evi.tif", package="dtwSat"))
ndvi = brick(system.file("lucc_MT/data/ndvi.tif", package="dtwSat"))
red = brick(system.file("lucc_MT/data/red.tif", package="dtwSat"))
blue = brick(system.file("lucc_MT/data/blue.tif", package="dtwSat"))
nir = brick(system.file("lucc_MT/data/nir.tif", package="dtwSat"))
mir = brick(system.file("lucc_MT/data/mir.tif", package="dtwSat"))
doy = brick(system.file("lucc_MT/data/doy.tif", package="dtwSat"))
timeline = scan(system.file("lucc_MT/data/timeline", package="dtwSat"), what="date")
rts = twdtwRaster(evi, ndvi, red, blue, nir, mir, timeline = timeline, doy = doy)

time_interval = seq(from=as.Date("2007-09-01"), to=as.Date("2013-09-01"), 
                    by="12 month")
log_fun = weight.fun=logisticWeight(-0.1,50)

r_twdtw = twdtwApply(x=rts, y=patt, weight.fun=log_fun, breaks=time_interval, 
          filepath="~/test_twdtw", overwrite=TRUE, format="GTiff", mc.cores=3)

plotDistance(r_twdtw)


## End(Not run)


Search within the dtwSat package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.