VHPdownload {rts} | R Documentation |
Download AVHRR-based Vegetation and Drought satellite image products
Description
'VHPdownload' downloads a series of AVHRR and VIIRS images in a specific date or a period of dates. The format of the files are downloaded as GeoTiff, and they can be optionally returned as a Raster Time Series Object.
Usage
VHPdownload(x,dates,rts,ncore,...)
Arguments
x |
product name; it can be either of |
dates |
a vector, character or Date, with one or two items, specifiying an individual date or a range of dates as the form of |
rts |
logical; specifies whether the downloaded files should be returned as a Raster Time Series object |
ncore |
numeric; specifies the number of cores to use for parallel downloading of the files |
... |
additional arguments (Not implemented yet.) |
Details
This function assists to download Blended Vegetation Health Indices Product (blended VIIRS (2013-present) and AVHRR (1981-2012), below, referred as Blended-VHP or VHP). These images for are available with a weekly temporal resolution and a spatial resolution of 4 KM. Five products are available that are specified with the following abbreviations:
- 'SMT'
: Smoothed Brightness Temperature
- 'SMN'
: Smoothed NDVI
- 'TCI'
: Temperature Condition Index
- 'VHI'
: Vegetation Health Index
- 'VCI'
: Vegetation Condition Index
Data arrays are in geographic projection (grid with equal latitude and longitude interval).
Author(s)
Babak Naimi
Examples
## Not run:
library(raster)
library(RCurl)
# download Vegetation Health Index for two months
vhi <- VHPdownload(x='VHI',dates=c('2015.01.01','2015.02.28'),rts=TRUE) # output is as rts object
vhi
plot(vhi[[1]])
plot(vhi[2120000]) # plot time series at the specified cell number
# to make sure the dates are appropriately specified, use a Date object:
dates <- as.Date(c('2015.01.01','2016.12.31'),format="
dates
class(dates)
dates <- as.Date(c('2012-01-01','2012-12-31'),format="
dates
# If your machine has multiple cores, you can use parallel downloading to speed up the downloads
# Vegetation Condition Index for two years
vci <- VHPdownload(x='VCI',dates=dates,rts=TRUE,ncore=4)
vci
plot(vci[[1:2]])
## End(Not run)