Description Usage Arguments Details Value Author(s) See Also Examples
Looks for ASCII files of downloaded MODIS data in a directory and creates new ASCII raster grid files that allow data downloaded using MODISTools to connect to a GIS environment. The new raster grid files can be converted into raster images and loaded into a GIS environment where further data processing or spatial analysis can take place.
1 |
Dir |
Character; file path to the directory where downloaded ASCII files to be processed are located and the output is written: default |
DirName |
Character; the name of the directory (a subdirectory found in directory specified as |
SubDir |
Logical; if TRUE, all ASCII raster grids created from one MODIS data file will be collected under a subdirectory, within |
NoDataValues |
Named list; the no data values for all the data bands contained in the files. Should be specified as a list of vectors: the names for the list elements should be the product codes and each element should contain a named vector of no data values for bands within that product. For guidance, see the example below. All data bands found in the MODIS data files should be listed in this argument. These values are neccessary to identify pixels with missing data. The correct no data values for the data bands of interest can be found at on the ORNL LPDAAC website. |
A raster grid file is created for each grid found in a MODIS data file (i.e. a new file is written for each date that occurs in a time series). In other words, where the MODIS data file may follow a tile of pixels over time, the raster grids split up each tile to create a new file for that tile at each new date. Therefore, multiple raster grids may be created from one MODIS data file. These files can be stored in one directory or nested in subdirectories for each MODIS data file, using the optional argument SubDir
. By default, the subdirectories are created to retain the spatial structure.
The data are in the MODIS projection system. To combine a raster grid with a projection, the two files must be stored in the same directory with the same file name. Every raster grid needs a respective PRJ file. The projection (PRJ) file for each ASCII raster grid is included in the function output.
Multiple ASCII raster grid files, with PRJ files, containing a tile of MODIS pixels at a given date, either all written to one directory or separated into subdirectories for each MODIS data file found. The file names for each raster grid created are composed of the following: "GRID_", the file name of the relevant MODIS data file, the data band that the grid pertains to, and finally the MODIS acquisition date for the grid (in Julian date format).
Sean Tuck
MODISSubsets
MODISSummaries
ExtractTile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
# dontrun() used because running the example requires internet access.
dat <- EndCoordinatesExample
names(dat) <- c("lat", "long", "start.date", "end.date", "ID")
MODISSubsets(dat, Products = "MOD13Q1", Size = c(1,1), StartDate = TRUE,
Bands = c("250m_16_days_EVI", "250m_16_days_NDVI", "250m_16_days_pixel_reliability"))
MODISGrid(NoDataValues = list("MOD13Q1" = c("250m_16_days_EVI" = -3000,
"250m_16_days_NDVI" = -3000,
"250m_16_days_pixel_reliability" = -1)))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.