convert_modis: Convert MODIS files

Description Usage Arguments Value Author(s) Examples

Description

Convert MODIS files into a Raster* object, and possibly convert raw DN to physical values.

Usage

1
2
3
convert_modis(path = ".", pattern = NULL, type, convertDN = TRUE,
                     extractAll = FALSE, filename = rasterTmpFile(), datatype = "FLT4S",
                     overwrite = TRUE, ...)

Arguments

path

Path to the folder where MODIS files are stored. Default is the working directory. See preStack.

pattern

optional regular expression, only file names matching the regular expression will be extracted. See preStack.

type

character vector of length 1 giving the type of MODIS data. Should be one of these values: 'Fpar_1km','Lai_1km','FparLai_QC','FparExtra_QC','FparStdDev_1km','LaiStdDev_1km','NDVI','EVI','VI','red','NIR','view_zenith_angle','sun_zenith_angle','relative_azimuth_angle','composite_day_of_the_year','pixel_reliability'

convertDN

a logical value indicating whether MODIS DN values should be converted to physical values. See convert_dn_modis. Default is TRUE.

extractAll

a logical value indicating whether time info, file names and date object should be returned in addition to the processed raster object. Default is FALSE.

filename

Passed to writeRaster.

datatype

Passed to writeRaster.

overwrite

Passed to writeRaster.

...

arguments passed to orgTime (for instance to restrict the studied period with begin or end or define new time stamps to interpolate to with nDays)

Value

a list with the following elements:

If there is only one element in the list, the convert_modis returns the unlist-ed Raster object.

Author(s)

Antoine Stevens

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# Get and extract NDVI MOD13A2 for JUNE 2009
runGdal(product="MOD13A2", begin = "2009.06.01", end = "2009.06.30",
       tileH = 19, tileV = 5 ,
       SDSstring =  "100000000000",job="H19V5")
# process and convert to raster
path <- "~/COPERNICUS/MODIS_DATA/PROCESSED/H19V5"
convert_modis(path = path,pattern = "16_days_NDVI")

## End(Not run)

antoinestevens/MODISExtra documentation built on May 10, 2019, 12:23 p.m.