modis_download | R Documentation |
This function is used to download and process modis files that can then be
classified into floodmaps using modis_classify()
. Important: MODIS
bands 1-7 will be downloaded, yet only band 7 should be used in
modis_classify()
. Note that the filenames simply correspond to the
aqcuisition date of the MODIS satellite imagery.
modis_download(
dates = NULL,
outdir = getwd(),
tmpdir = tempdir(),
username = NULL,
password = NULL,
messages = T,
overwrite = F,
overwrite_temp = F
)
dates |
character vector of dates. Dates for which a modis image should be downloaded. Needs to be of format "YYYY-mm-dd". |
outdir |
character. Directory were the downloaded and processed files
should be stored to. This data will be used in |
username |
character. Username of your EarthData account |
password |
character. Password of your EarthData account |
overwrite |
logical. If such a file already exists in the path, should it be overwritten? |
overwrite_temp |
logical. If the temporary HDF file already exists in the tmpdir, should it be overwritten? |
tempdir |
character. Directory were intermediary files should be stored
to (e.g. hdf files). By default these are stored to |
Character vector of filename pointing to the downloaded files
## Not run:
# Download files for two dates
files <- modis_download(
dates = c("2020-01-01", "2020-01-01")
, outdir = getwd()
, tmpdir = tempdir()
, username = "username"
, password = "password"
, overwrite = F
)
# Check them
files
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.