Learn R Programming

sits (version 0.10.0)

sits_cube.brick_cube: Defines a cube from a set of image bricks

Description

Defines a cube to retrieve data from a set of image files. All image files should have the same spatial resolution and same projection. Each input band has to be organised as a raster brick, and the number of input files must match the number of bands. All input files must have the same spatial resolution and share the same timeline (in order). The timeline for the cube must be provided.

Usage

# S3 method for brick_cube
sits_cube(
  type = "BRICK",
  ...,
  name = "brick_cube",
  satellite,
  sensor,
  timeline = NULL,
  bands = NULL,
  files = NULL
)

Arguments

type

type of cube

...

other parameters

name

name of output data cube

satellite

satellite

sensor

sensor

timeline

vector with timeline of the files

bands

vector of bands associated to the files

files

vector of file names for each band

Value

data cube

Examples

Run this code
# NOT RUN {
# Create a raster cube based on bricks
# inform the files that make up a raster brick with 392 time instances
files <- c(system.file("extdata/raster/mod13q1/sinop-crop-ndvi.tif",
    package = "sits"
))

# create a raster cube file based on the information about the files
raster_cube <- sits_cube(
    type = "BRICK",
    name = "Sinop-crop",
    satellite = "TERRA",
    sensor = "MODIS",
    timeline = timeline_modis_392,
    bands = "NDVI",
    files = files
)
# }

Run the code above in your browser using DataLab