sits_as_stars | R Documentation |
Uses the information about files, bands and dates
in a data cube to produce an object of class stars
.
User has to select a tile from the data cube. By default,
all bands and dates are included in the stars
object.
Users can select bands and dates.
sits_as_stars(
cube,
tile = cube[1L, ]$tile,
bands = NULL,
dates = NULL,
proxy = FALSE
)
cube |
A sits cube. |
tile |
Tile of the data cube. |
bands |
Bands of the data cube to be part of |
dates |
Dates of the data cube to be part of |
proxy |
Produce a stars proxy object. |
An space-time stars object.
By default, the stars
object will be loaded in memory. This
can result in heavy memory usage. To produce a stars.proxy
object,
uses have to select a single date, since stars
does not allow
proxy objects to be created with two dimensions.
Gilberto Camara, gilberto.camara.inpe@gmail.com
if (sits_run_examples()) {
# convert sits cube to an sf object (polygon)
data_dir <- system.file("extdata/raster/mod13q1", package = "sits")
cube <- sits_cube(
source = "BDC",
collection = "MOD13Q1-6.1",
data_dir = data_dir
)
stars_object <- sits_as_stars(cube)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.