This function allows to apply spatial buffers for SCL tiles in order to enrich the cloud cover classification and exclude potentially degradated pixels. It uses GRASS GIS for fast processing. User's will need to provide a working GRASS installation in order to use this function. It can be applied in parallel to further increase computation speed.

scl_buffer(scl_files, mask_values, mask_buffer, grass_bin, outdir, threads)

Arguments

scl_files

A chrachter vector to the input SCL files.

mask_values

An integer vector indiacating the values of the raster which are considered as values to mask. Note that the resulting output raster will get the first value for all pixels within the spatial buffer.

mask_buffer

A numeric indicating the distance of the spatial buffer in map units (usuall meters).

grass_bin

A charachter vector to the directory of the GRASS binaries.

outdir

A charachter vector pointin towards a directory where the output files should be written to. Note that this should be a different directory from where the original files are stored because the output files will have identical names.

threads

The number of threads for parallel computation.

Value

Nothing. Writes buffered SCL mask to outdir. All cells within the buffer will obtain the value of the first element in mask_values.

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