MODISoptions | R Documentation |
Set or retrieve MODIS package options (per user or system-wide). If
save = TRUE
(default), changes will persist through sessions and updates.
MODISoptions( localArcPath, outDirPath, pixelSize, outProj, resamplingType, dataFormat, gdalPath, MODISserverOrder, dlmethod, stubbornness, wait, quiet, cellchunk, systemwide = FALSE, save = TRUE, checkTools = TRUE, checkWriteDrivers = TRUE, ask = TRUE, check_earthdata_login = TRUE )
localArcPath |
|
outDirPath |
|
pixelSize |
Output pixel size (in target reference system units) passed
to |
outProj |
Target reference system passed to |
resamplingType |
Defaults to |
dataFormat |
|
gdalPath |
|
MODISserverOrder |
|
dlmethod |
|
stubbornness |
|
wait |
|
quiet |
|
cellchunk |
Default |
systemwide |
A |
save |
|
checkTools |
|
checkWriteDrivers |
|
ask |
|
check_earthdata_login |
|
These settings are easy to change and take effect immediately! However,
please mind that the
CRAN Repository Policy
does not permit automated write access to the user's file system exempt for
tempdir()
. Therefore, changes made to MODISoptions()
remain temporary for
the current session unless write access is explicitly granted by the user in
interactive mode, in which case a permanent settings file is created in
file.path("~/.MODIS_Opts.R")
(per user) or
file.path(R.home(component = "etc"), '.MODIS_Opts.R')
(system-wide, write
access provided).
Due to similar reasons, 'localArcPath' and 'outDirPath' default to
tempdir()
and should be changed immediately after loading the package in
order to make downloaded files permanently available. You may also specify a
shared network drive if you have a central MODIS data server.
If you change default values, consider that your settings have to be valid for any MODIS product, layer and area!
Please note that in order to download MODIS files from any available server, you are required to
register for an Earthdata Login profile at https://urs.earthdata.nasa.gov/users/new,
fill out mandatory fields therein, and
create a .netrc
file in your home directory containing the Earthdata
server address and your login credentials. An automated solution for the
creation of such a file is provided through EarthdataLogin()
.
An invisible list
of MODIS options. In addition, the most relevant of
these options are printed to the console. Use utils::capture.output()
to
prevent this behavior.
Matteo Mattiuzzi, Steven Mosher and Florian Detsch
## Not run: ## get options MODISoptions() ## set options lap = "/another/path/to/MODIS_ARC" # 'localArcPath' odp = file.path(lap, "PROCESSED") # 'outDirPath' MODISoptions(localArcPath = lap, outDirPath = odp) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.