oMODIS: Obtain MODIS data

Description Usage Arguments Details Value Functions See Also Examples

View source: R/oMODIS.R

Description

Obtain data from various MODIS datasets.

Usage

1
2
3
4
5
oMODIS(mask = NULL, period = NULL, product = NULL, layer = 1,
  assertQuality = TRUE, ...)

downloadMODIS(file = NULL, localPath = NULL, getDates = NULL,
  getFiles = NULL)

Arguments

mask

[geom | Spatial* | sf | raster]
spatial object of which the extent is the area of interest.

period

[integerish(.)]
year of interest (YYYY), optionally concatenated to day of the year (DDD), which must be between 001 and 366.

product

[character(1)]
name of the modis-product of interest. Can be abbreviated if an index is provided.

layer

[character(1) | integerish(1)]
layer(s) of interest. Either the integer of the layers position or the name of the layer.

assertQuality

[logical(1)] (not supported yet)
should the quality flags of the ESA CCI land-cover dataset be extracted (TRUE, default) or should merely the data-layer be extracted (FALSE)?

...

[various]
other arguments.

file

[character(1)]
the name of the file to download.

localPath

[character(1)]
the local path where files are supposed to be stored (i.e. on your harddisc).

getDates

[character(1)]
the online path to the directory where folders for all valid dates are stored (recently the first level after selecting the product).

getFiles

[character(1)]
the online path to the directory where product files are stored.

Details

The object provided in mask is treated as a single mask, irrespective of that object consisting of only one or several features. The extent comprising all features (point(s), line(s), polygon(s)) is used as area of interest. This is in contrast to obtain, where a mask may consist of several features, each of which are treated as seperate mask.

The period can either be given as a single value if only one year is of interest, or as two values, the start and end date. If you do not specify DDD, it will be set to "001" and "366" for start and end year respectively.

Supported MODIS-products - in the sense that predefined meta-data are available within this package - are:

Get additional information about the spatial background from Marine Geospatial Ecology Tools

Value

A RasterLayer or RasterStack of MODIS data.

Functions

See Also

Other obtain operators (Global): oESALC, oGFC, oWCLIM

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
## Not run: 

water <- oMODIS(mask = rtGeoms$mask, period = 2000,
                product = "MOD44W", layer = 1)
visualise(raster = water, trace = TRUE)


# specify exact dates
modEvi <- oMODIS(mask = rtGeoms$mask, period = c(2016100, 2016250),
                 product = "MOD13A3", layer = "EVI")
visualise(raster = modEvi, trace = TRUE)


# handles also more than one tile at the same time
library(magrittr)
myMask <- geomRectangle(data.frame(x = c(571751, 612443),
                                   y = c(5569592, 5536989))) %>%
  setCRS(crs = projs$sinu)

water <- oMODIS(mask = myMask, period = 2000,
                product = "MOD44W", layer = 1)
visualise(raster = water, trace = TRUE)


# get the (updated) bibliography
reference(style = "bibtex")


# the modis tiles
modWindow <- data.frame(x = c(-20015109.354, 20015109.354),
                        y = c(-10007554.677, 10007554.677))
tiles_modis <- geomTiles(window = modWindow, cells = c(36, 18),
                         crs = projs$sinu)
visualise(geom = tiles_modis)

## End(Not run)

EhrmannS/rasterTools documentation built on Sept. 4, 2019, 10:34 a.m.