
Last chance! 50% off unlimited learning
Sale ends in
Reorganize the storage structure of your MODIS archive according to the
settings in options("MODIS_arcStructure")
. Depending on the specified
'source', you can also use this function to gather all MODIS grid files on
your machine and reorganize them. The main purpose is to organize the
archive, but it is also possible to copy a subset of files to a desired
location!
orgStruc(from, to, structure, pattern, move = FALSE, quiet = FALSE)
If quiet = FALSE
(default), information on how many files have been moved
(or copied) and deleted is printed to the console.
character
. Local path to look for MODIS files, defaults to
options("MODIS_localArcPath")
(see MODISoptions()
).
character
. Target folder to move (or copy) MODIS files to,
defaults to options("MODIS_localArcPath")
.
character
. Storage structure, defaults to
options("MODIS_arcStructure")
(see Examples).
Regular expression passed to list.files()
. Insert a pattern
if you want to extract specific files from your archive.
logical
. If TRUE
, files are moved and duplicated files are
deleted. If FALSE
(default), files are just copied and thus remain in the
origin folder. Note that the copying process performs rather slowly when
dealing with large files, e.g. 250-m "MOD13Q1"
.
logical
, defaults to FALSE
.
Matteo Mattiuzzi
if (FALSE) {
# MOVE all MODIS grid data to the directory and structure as defined in
# options("MODIS_localArcPath", "MODIS_arcStructure")
orgStruc(move = TRUE)
# COPY all MOD13Q1 from 2001 to folder "MyFiles/MOD13Q1.collection/"
orgStruc(pattern="MOD13Q1.A2001*.",to="MyFiles",structure="PRODUCT.CCC")
# COPY all MOD13Q1 to folder "MyFiles/"
orgStruc(pattern="MOD13Q1.*.",to="MyFiles",structure="")
}
Run the code above in your browser using DataLab