Learn R Programming

sits (version 0.10.0)

sits_cube.bdc_cube: Defines a data cube for a BDC STAC

Description

Defines a cube to retrieve data from the Brazil Data Cube (BDC) STAC. The retrieval is based on tiles of a given cube. For more on BDC, please see http://brazildatacube.dpi.inpe.br/

Usage

# S3 method for bdc_cube
sits_cube(
  type = "BDC",
  ...,
  name = "bdc_cube",
  url = NULL,
  collection = NULL,
  tiles = NULL,
  bands = NULL,
  roi = NULL,
  start_date = NULL,
  end_date = NULL
)

Arguments

type

Type of cube.

...

Other parameters to be passed for specific types.

name

Name of the output data cube (optional).

url

URL for the BDC catalog (mandatory).

collection

BDC collection to be searched (mandatory).

tiles

Tile names to be searched (optional).

bands

Bands names to be filtered (optional).

roi

Region of interest (optional), expressed either as an sfc or sf object from sf package, a a GeoJSON following the rules from RFC 7946, or a bounding box with named XY values ("xmin", "xmax", "ymin", "ymax").

start_date

Initial date for the cube files (optional).

end_date

Final date for the cube files (optional).

Value

A data cube.

References

`rstac` package (https://github.com/brazil-data-cube/rstac)

Examples

Run this code
# NOT RUN {
# this example requires access to an external service, so should not be run
# by CRAN

# Provide your BDC credentials as enviroment variables
# Sys.setenv(
# "BDC_ACCESS_KEY" = <your_bdc_access_key>
# )

# create a raster cube file based on the information about the files
cbers_tile <- sits_cube(
    type = "BDC",
    name = "cbers_022024",
    bands = c("NDVI", "EVI"),
    tiles = "022024",
    collection = "CB4_64_16D_STK-1",
    start_date = "2018-09-01",
    end_date = "2019-08-28"
)
# }

Run the code above in your browser using DataLab