dimensions

Query data cube properties

Description

Query data cube properties

Usage

dimensions(obj)

Arguments

Argument Description
obj a data cube proxy object (class cube)

Details

Elements of the returned list represent individual dimensions with properties such as dimension boundaries, names, and chunk size stored as inner lists

Value

Dimension information as a list

Examples

# create image collection from example Landsat data only 
# if not already done in other examples
if (!file.exists(file.path(tempdir(), "L8.db"))) {
  L8_files <- list.files(system.file("L8NY18", package = "gdalcubes"),
                         ".TIF", recursive = TRUE, full.names = TRUE)
  create_image_collection(L8_files, "L8_L1TP", file.path(tempdir(), "L8.db"), quiet = TRUE) 
}

L8.col = image_collection(file.path(tempdir(), "L8.db"))
v = cube_view(extent=list(left=388941.2, right=766552.4, 
              bottom=4345299, top=4744931, t0="2018-04", t1="2018-06"),
              srs="EPSG:32618", nx = 497, ny=526, dt="P1M")
dimensions(raster_cube(L8.col, v))
$t
$t$low
[1] "2018-04-01"

$t$high
[1] "2018-06-30"

$t$count
[1] 3

$t$pixel_size
[1] "P1M"

$t$chunk_size
[1] 1


$y
$y$low
[1] 4345299

$y$high
[1] 4744931

$y$count
[1] 526

$y$pixel_size
[1] 759.7567

$y$chunk_size
[1] 384


$x
$x$low
[1] 388941.2

$x$high
[1] 766552.4

$x$count
[1] 497

$x$pixel_size
[1] 759.7811

$x$chunk_size
[1] 384