extract_gfc: Extracts GFC data for a given AOI

Description Usage Arguments Details Value See Also

View source: R/extract_gfc.R


This function extracts a dataset for a given AOI from a series of pre-downloaded GFC tiles. The download_tiles function should be used beforehand in order to download the necessary data to the specified data_folder. Note that the output file format is fixed as GeoTIFF with LZW compression.


extract_gfc(aoi, data_folder, to_UTM = FALSE, stack = "change",
  data_year = 2015, ...)



an Area of Interest (AOI) as a SpatialPolygons* object. If the AOI is not in WGS 1984 (EPSG:4326), it will be reprojected to WGS84.


folder where downloaded GFC product tiles are located (see download_tiles function.


if TRUE, then reproject the output into the UTM zone of the AOI centroid. If FALSE, retain the original WGS84 projection of the GFC tiles.


the layers to extract from the GFC product. Defaults to "change". See Details.


which version of the Hansen data to use


additional arguments as for writeRaster, such as filename, or overwrite.


The stack option can be "change" (the default), "first", or "last". When set to "change", the forest change layers (treecover2000, loss, gain, lossyear, and datamask) will be extracted for the given aoi. The "first" and "last" options will mosaic the 2000 or last year composite top of atmosphere (TOA) reflectance images (respectively).


RasterStack with GFC layers

See Also

download_tiles, annual_stack, gfc_stats

gfcanalysis documentation built on May 19, 2017, 9:53 p.m.

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

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

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

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