orgStruc: Reorganise MODIS Files in Local Data Archive

Description Usage Arguments Value Author(s) Examples

View source: R/orgStruc.R

Description

Re-organise 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 you computer and reorganise them. The main purpose is to organise the archive, but it is also possible to copy a subset of files to a desidered location!

Usage

1
orgStruc(from, to, structure, pattern, move = FALSE, quiet = FALSE)

Arguments

from

character. Local path to look for MODIS files, defaults to options("MODIS_localArcPath") (see MODISoptions).

to

character. Target folder to move (or copy) MODIS files to, defaults to options("MODIS_localArcPath").

structure

character. Storage structure, defaults to options("MODIS_arcStructure") (see Examples).

pattern

Regular expression passed to list.files. Insert a pattern if you want to extract specific files from your archiv.

move

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'.

quiet

logical, defaults to FALSE.

Value

If quiet = FALSE, information on how many files have been moved (or copied) and deleted is printed to the console.

Author(s)

Matteo Mattiuzzi

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# 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="") 

## End(Not run)

MODIS documentation built on Nov. 12, 2020, 5:06 p.m.