Interface to download and process satelite data.
proSat(t.var = NULL, xy = NULL, o.time = NULL, d.path = NULL,
p.raster = FALSE, p.res = NULL, user.cred = NULL, pad = 10)
Target variable.
Object from which an extent can be derived.
Object of class Date.
Output data path for downloaded data.
Logical. Should the output be re-projected?
Target pixel resolution (if p.raster is TRUE).
Two element character vector containing username and password.
Padding expressed in number of pixels. Used when re-projecting and resampling.
One or multiple raster objects.
Downloads and pre-processes pre-selected satellite datasets That provide ecologically meaningful variables. xy is required to define a reference extent for which the data will be downloaded and croped. If p.raster is TRUE, the function will also re-project the output to the projection of xy. Note that xy does not required reprojection a priori. The function will find the approapriate projection to use when deriving a reference extent. If p.raster is TRUE p.res is also required to determine the output pixel resolution. The outputs are presented in GTiff format and are croped and masked by default. Note that the download files might not correspond to the dates supplied through o.time. The function will consider the temporal resolution of the target dataset and compare the possible and the requested dates. If a requested date is not found, the function will instead provide the closest image time. As a consequence, the number of downloaded files might be lesser than the number of dates. The function will inform the user on this by providing a list object which contains the downloaded dates ($date) as well as the path for the correspondent image ($path).
# NOT RUN {
{
# return list of variables
modis.var <- proSat()
}
# }
Run the code above in your browser using DataCamp Workspace