Learn R Programming

sits (version 1.1.0)

source_bands: Source bands functions

Description

These functions provide an API to handle/retrieve data from bands.

.source_bands() lists all bands defined in a collection that matches the criteria defined by its parameters. If no filter is provided, all bands are returned.

.source_bands_reap() reaps the attributes' values indicated by key argument for all bands filtered by its parameters.

.source_bands_band_name() returns the band_name attribute of all bands filtered by its parameters.

.source_bands_resolution() returns the resolution attribute of all bands filtered by its parameters.

.source_bands_to_sits() converts any bands to its sits name indicated in band entry.

.source_bands_to_source() converts any bands to its corresponding names indicated in band_name attribute.

.source_cloud() lists cloud band for a collection.

.source_cloud_bit_mask() returns the bit_mask attribute of a cloud band, indicating if the cloud band is a bit mask.

.source_cloud_values() returns the values attribute of a cloud band.

.source_cloud_interp_values() returns the interp_values attribute of a cloud band, indicating which value/bit must be interpolated (e.g. shadows, clouds).

Usage

.source_bands(source, collection, ..., fn_filter = NULL, add_cloud = TRUE)

.source_bands_reap( source, collection, key, ..., bands = NULL, fn_filter = NULL, add_cloud = TRUE, default = NULL )

.source_bands_band_name(source, collection, ..., bands = NULL)

.source_bands_resolution( source, collection, ..., bands = NULL, fn_filter = NULL, add_cloud = TRUE )

.source_bands_to_sits(source, collection, bands)

.source_bands_to_source(source, collection, bands)

.source_cloud()

.source_cloud_bit_mask(source, collection)

.source_cloud_values(source, collection)

.source_cloud_interp_values(source, collection)

Value

The values returned by each function are described as follows.

.source_bands() returns a character vector with bands names

.source_bands_reap() returns any object stored in the band attribute indicated by key parameter. If attribute is not found, default value is returned.

.source_bands_band_name() returns a character vector.

.source_bands_resolution() returns a named list

containing numeric vectors with the spatial resolution of a band.

.source_bands_to_sits() returns a character vector with all converted bands name.

.source_bands_to_source() returns a character vector with all converted bands name.

.source_cloud() returns a character vector with cloud band name.

.source_cloud_bit_mask() returns a logical value.

.source_cloud_values() returns a named list containing all values/or bits description of a cloud band.

.source_cloud_interp_values() returns a numeric

vector with all values/or bits to be interpolated if found in the cloud band.

Arguments

source

Valid data source.

collection

Image collection. source.

fn_filter

A function that will be applied in each band to filter selection. The provided function must have an input parameter to receive band object and return a logical value.

add_cloud

Should the cloud band be returned?

key

Key of a band object.

bands

Bands to be retrieved

default

Value to be returned if an attribute or key is not found.