Extracts GFC data for a given AOI

Share:

Description

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.

Usage

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

Arguments

aoi

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.

data_folder

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

to_UTM

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.

stack

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

data_year

which version of the Hansen data to use

...

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

Details

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).

Value

RasterStack with GFC layers

See Also

download_tiles, annual_stack, gfc_stats