extent

Derive the spatiotemporal extent of an image collection

Description

Derive the spatiotemporal extent of an image collection

Usage

extent(x, srs = "EPSG:4326")

Arguments

Argument Description
x image collection proxy object
srs target spatial reference system

Value

a list with elements left, right, bottom, top, t0 (start date/time), and t1 (end date/time)

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"))
extent(L8.col,"EPSG:32618")
$left
[1] 388941.2

$right
[1] 766552.4

$top
[1] 4744931

$bottom
[1] 4345299

$t0
[1] "2018-01-06T00:00:00"

$t1
[1] "2018-12-17T00:00:00"
cube_view(extent=extent(L8.col,"EPSG:32618"),
          srs="EPSG:32618", nx = 497, ny=526, dt="P1M")
A data cube view object

Dimensions:
               low             high count       pixel_size
t       2018-01-01       2018-12-31    12              P1M
y 4345299.48874003 4744931.28639543   526 759.756269306837
x 388941.155555047 766552.357592417   497 759.781090618451

SRS: "EPSG:32618"
Temporal aggregation method: "first"
Spatial resampling method: "near"