Learn R Programming

bfastSpatial (version 0.6.2)

getMODISinfo: Get MODIS infos

Description

Parses through MODIS file names and retrieve information on acquisition date. Future versions will include retrieval of sensor information, tile ID, etc... The function is vectorized.

Usage

getMODISinfo(x)

Arguments

x

Character. MODIS file name

Value

A dataframe with one column ($date) of class Date

Examples

Run this code
# NOT RUN {
# Simple case
fileName <- '/path/to/file/MOD17A2.A2008097.h11v09.005.2008142064019.hdf'
getMODISinfo(fileName)

# Multile files
fileNames <- c('/path/to/file/MOD17A2.A2008097.h11v09.005.2008142064019.hdf', 'MOD17A2.A2008097.h11v09.005.2008164064019.tif')
getMODISinfo(fileNames)

# Get only a vector of dates
getMODISinfo(fileNames)$date
# }

Run the code above in your browser using DataLab