theia2r_getElements: Get information from S2 short name

Description Usage Arguments Value Note Author(s) Examples

Description

This accessory function extracts metadata included in the name of a Sentinel-2 product which follows the theia2r naming convention (see safe_shortname).

Usage

1
theia2r_getElements(s2_names, format = "list", abort = TRUE)

Arguments

s2_names

A vector of Sentinel-2 product names in the theia2r naming convention.

format

One between list of data.frame.

abort

Logical parameter: if TRUE (default), the function aborts in case any of s2_names is not recognised; if FALSE, a warning is shown, and a list with only the element "type"='unrecognised' is returned.

Value

A list or a data.frame of the output metadata.

Note

License: GPL 3.0

Author(s)

Luigi Ranghetti, phD (2017) ranghetti.l@irea.cnr.it, Pascal Obstetar, (2018) pascal.obstetar@gmail.com

Examples

1
2
3
4
5
6
# Define product name
fs2nc_examplename <-
  "/path/of/the/product/S2A1C_20170603_022_32TQQ_TOA_20.tif"

# Return metadata
theia2r_getElements(fs2nc_examplename)

pobsteta/theia2r documentation built on May 25, 2019, 2:21 p.m.