Learn R Programming

MODIS (version 1.2.11)

arcStats: Get Summary of Local MODIS Data

Description

In the same manner as getHdf(), this function quantifies the availability of local MODIS .hdf data and gives you a visual and/or tabular overview.

Usage

arcStats(
  product,
  collection = NULL,
  extent = "global",
  begin = "2000.01.01",
  end = format(Sys.Date(), "%Y.%m.%d"),
  asMap = TRUE,
  outName = NULL,
  ...
)

Value

An invisible NULL (probably this will change to a matrix-like object similar to the .csv output). If asMap = TRUE, a "table.csv" and a "image.png" file in 'outDirPath'.

Arguments

product

character, see getProduct(). MODIS grid product to be checked.

collection

character or integer, see getCollection(). MODIS product version.

extent

Extent information, defaults to "global". See getTile().

begin

character. Begin date of MODIS time series, see transDate().

end

character. End date, defaults to Sys.Date().

asMap

Controls output type. Possible options are TRUE (.png), FALSE (.csv) or "both".

outName

character. Name of output file, defaults to "product.collection.YYYYMMDDHHMMSS.png" (or .csv) of the function call or, if applicable, "product.collection.extent.YYYYMMDDHHMMSS.png" (or .csv).

...

Arguments passed to MODISoptions(), most importantly 'outProj' and 'outDirPath'.

Author

Matteo Mattiuzzi

Examples

Run this code
if (FALSE) {
# The following examples expect that you have some data stored locally!
########################################################### 
# generates 2 png's and 2 csv's, one for TERRA one for AQUA
arcStats(product="M.D13Q1")

# -"- with the specified countries
arcStats(product="M.D13Q1",extent=c("austria","germany","italy"))

# generates 1 png and 1 csv for AQUA
arcStats(product="MYD13Q1",begin="2005001",outName="MyDataStart2005")

# generates 1 png for AQUA for the selected area and plots it in 'Sinusoidal'
arcStats(product="MYD13Q1",begin="2005001",asMap=TRUE, outName="InteractiveSelection2005",
         extent=getTile(), outProj="asIn")

# -"- and plots it in 'Geographic' Coordinates.
arcStats(product="MYD13Q1",begin="2005001",asMap=TRUE, outName="InteractiveSelection2005",
         extent=getTile(), outProj="GEOGRAPHIC")
}

Run the code above in your browser using DataLab