source_cube {sits}R Documentation

Functions to instantiate a new cube from a source

Description

These functions provide an API to instantiate a new cube object and access/retrieve information from services or local files to fill cube attributes.

A cube is formed by images (items) organized in tiles. To create a sits cube object (a tibble), a set of functions are called in order to retrieve metadata.

.source_cube() is called to start the cube creation from a source.

.source_item_get_date() retrieves the date of an item (a set of images from different bands that forms a scene).

.source_item_get_hrefs() retrieves the paths or URLs of each file bands of an item.

.source_item_get_bands() retrieves the bands present in an item.

.source_item_get_resolution() retrieves the supported resolution of an item (for each band).

.source_items_new() this function is called to create an items object. In case of Web services, this function is responsible for making the Web requests to the server.

.source_items_fileinfo() creates the fileinfo specification from items object.

.source_items_tiles_group() organizes items by tiles and arrange items in each tile by date.

.source_items_get_sensor() retrieves the sensor from items object.

.source_items_get_satellite() retrieves the satellite name (platform) from items object.

.source_items_tile_get_crs() retrieves the CRS string from items.

.source_items_tile_get_name() retrieves the tile name from items.

.source_items_tile_get_bbox() retrieves the bounding box from items of a tile.

.source_itimes_cube() is called to create a data cubes tile, that is, a row in sits data cube.

Usage

.source_cube(source, ..., collection)

.source_item_get_date(source, ..., item, collection = NULL)

.source_item_get_hrefs(source, ..., item, collection = NULL)

.source_item_get_bands(source, ..., item, collection = NULL)

.source_item_get_resolution(source, ..., item, collection = NULL)

.source_items_new(source, ..., collection)

.source_items_bands_select(source, ..., collection, items, bands)

.source_items_fileinfo(source, ..., items, collection = NULL)

.source_items_tiles_group(source, ..., items, collection = NULL)

.source_collection_sensor(source, collection)

.source_collection_satellite(source, collection)

.source_items_tile_get_crs(source, ..., tile_items, collection = NULL)

.source_items_tile_get_name(source, ..., tile_items, collection = NULL)

.source_items_tile_get_bbox(source, ..., tile_items, collection = NULL)

.source_items_cube(source, ..., collection, items, file_info)

Arguments

source

A character value referring to a valid data source.

...

Additional parameters.

collection

A character value referring to a collection of the source.

items

Any object referring to the images bands (scenes) that compose a cube.

bands

Bands to be selected in the collection.

file_info

A tibble that organizes the metadata about each file in the tile: date, band, resolution, and path (or URL).

data_dir

Directory where local files are stored

Value

The values returned by each function are described as follows.

.source_cube() returns a sits tibble with cube metadata.

.source_item_get_date() returns a Date value.

.source_item_get_hrefs() returns a character vector containing paths to each image band of an item.

.source_item_get_bands() returns a character vector containing bands name of an item.

.source_item_get_resolution() returns a named list with numeric vectors containing the supported resolution for each band

.source_items_new() returns any object referring the images of a sits cube.

A STACItemCollection object returned by rstac with items selected.

.source_items_bands_select() returns the same object as items with selected bands.

.source_items_fileinfo() returns a tibble containing sits cube.

.source_items_tiles_group() returns a list of items.

.source_items_get_sensor() returns a character value.

.source_items_get_satellite() returns a character value.

.source_items_tile_get_crs() returns a character value.

.source_items_tile_get_name() returns a character value.

.source_items_tile_get_bbox() returns a numeric vector with 4 elements (xmin, ymin, xmax, ymax).

.source_items_cube() returns a tibble containing a sits cube tile (one row).


[Package sits version 0.15.0 Index]