
Translation pipeline using GRASS
statsGRASS.Rd
Translation pipeline using GRASS
Usage
statsGRASS(
grass,
addon_base,
areas,
tree_cover,
tree_loss,
tree_co2,
idcol,
thresholdClump,
thresholdCover,
years,
outdir = NULL,
saveRaster,
hideoutput = FALSE,
.tmpdir = tempdir()
)
Arguments
- grass
A character vector pointing to the directory where GRASS binaries are installed.
- addon_base
A character vector pointing to the directory where GRASS add-on binaries are installed. In order to work, the (
r.area
)[https://grass.osgeo.org/grass78/manuals/addons/r.area.html] add-on needs to be installed. See (here)[https://grass.osgeo.org/download/addons/] to learn how to install GRASS add-ons.- areas
An
sf
object with polygons representing areas of interest for which to preprocess individual rasters.- tree_cover
A character vector pointing to the raster file representing tree cover in percentage for the entire study domain.
- tree_loss
A character vector pointing to the raster file representing the year of tree cover loss for the entire study domain.
- tree_co2
A character vector pointing to the raster file representing co2 emissions from tree cover loss for the entire study domain.
- idcol
A character vector identifying the a column name which uniquely identifies the polygons in the
areas
object. Values will be used to name the output rasters.- thresholdClump
A numeric value identifying the number of pixels of smallest clumps. All raster cell clumps smaller than the specified threshold will be removed.
- thresholdCover
A numeric value identifying the smallest cover percentage to be considered as forest. All raster cell values below this threshold will be removed
- years
A numeric vector specifying for which years to calculate an annual forest mask starting from 2001. (e.g. years = c(2001:2010)).
- outdir
A character pointing to a directory where the output files will be written to. If files with the same name as specified by the values in
idcol
are present, their calculation is skipped without warning.- saveRaster
Logical indicating if raster are to be saved to disk
- hideoutput
Logical indicating if grass output should not be printed in console.
- .tmpdir
A character string pointing to a directory where intermediate GRASS files will be written to. Defaults to the output of
tempdir()
. Note, that you should have write access to the directory, otherwise the the function will fail.
Author
Darius Görgen (MapTailor Geospatial Consulting GbR) info@maptailor.net
Maintainer: MAPME-Initiative contact@mapme-initiative.org
Contact Person: Dr. Johannes Schielein
Copyright: MAPME-Initiative
License: GPL-3