sits_cube: Defines a data cube

Description Usage Arguments See Also Examples

View source: R/sits_cube.R

Description

Defines a cube to retrieve data. Cubes are associated to data services. The following services are available:

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
sits_cube(
  service = "BRICK",
  URL = NULL,
  name = NULL,
  satellite = NULL,
  sensor = NULL,
  tiles_names = NULL,
  geom = NULL,
  from = NULL,
  to = NULL,
  timeline = NULL,
  bands = NULL,
  files = NA
)

Arguments

service

Name of the data service.

URL

URL of the service provider.

name

Name of the data cube in the remote service.

satellite

Name of satellite

sensor

Name of sensor

tiles_names

Tile names to be filtered (for EOCUBES service)

geom

An sf object to filter tiles (for EOCUBES)

from

Starting date for the cube to be extracted

to

End date for the cube to be extracted

timeline

Vector with the timeline of the collection (only for local files)

bands

Vector of bands.

files

Vector of file names for each band (only for raster data).

See Also

To see the available values for the parameters above use sits_services, sits_config or sits_config_show.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
# Example 1. Create a data cube based on a WTSS service
cube_wtss <- sits_cube(service = "WTSS", name = "MOD13Q1")

# Example 2. Create a data cube based on the SATVEG service
cube_satveg <- sits_cube(service = "SATVEG", name = "terra")

# Example 3. 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.data"))

# create a raster cube file based on the information about the files
raster.tb <- sits_cube(name  = "Sinop-crop",
             timeline = timeline_modis_392, bands = "ndvi", files = files)

# Example 4. create a coverage from EOCUBES service
modis_cube <- sits_cube(service = "EOCUBES", name    = "MOD13Q1/006")
 # get information on the data cube
modis_cube %>% dplyr::select(service, URL, satellite, sensor)
# get information on the cube
modis_cube %>% dplyr::select(xmin, xmax, ymin, ymax, timeline)
}

e-sensing/sits.data documentation built on Dec. 26, 2019, 11:02 p.m.