uavRst (version 0.5-2)

otb_stat: Calculates local statistics for a given kernel size

Description

Calculates local statistics for a given kernel size

Usage

otb_stat(input = NULL, out = "localStat", ram = "8192", radius = 3,
  channel = NULL, retRaster = FALSE, outDir = NULL,
  verbose = FALSE, giLinks = NULL)

Arguments

input

of GeoTiff containing 1 ore more gray value bands

out

string pattern vor individual naming of the output file(s)

ram

reserved memory in MB

radius

computational window in pixel

channel

sequence of bands to be processed

retRaster

boolean if TRUE a raster stack is returned

outDir

output Directory

verbose

switch for system messages default is FALSE

giLinks

list. of GI tools cli pathes

Examples

Run this code
# NOT RUN {
require(uavRst)
require(link2GI)
# check if OTB is installed correctly
giLinks<-list()
giLinks$otb <- link2GI::linkOTB()
if (giLinks$otb$exist) {
setwd(tempdir())
data("pacman")
raster::writeRaster(pacman,"pacman.tif",overwrite=TRUE)

# calculate statistics
result<- otb_stat(input="pacman.tif",
                  radius=5,
                  retRaster = TRUE,
                  channel = 1, 
                  giLinks = giLinks)
#plot the results :
raster::plot(result[[1]])
}
# }

Run the code above in your browser using DataLab