image_collection

Load an existing image collection from a file

Description

This function will load an image collection from an SQLite file. Image collection files index and reference existing imagery. To create a collection from files on disk, use create_image_collection.

Usage

image_collection(path)

Arguments

Argument Description
path path to an existing image collection file

Value

an image collection proxy object, which can be used to create a data cube using raster_cube

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"))
L8.col
Image collection object, referencing 19 images with 12 bands
Images:
                                      name      left      top   bottom
1 LC08_L1TP_013032_20180131_20180207_01_T1 -74.67898 41.39099 39.25027
2 LC08_L1TP_013032_20180405_20180417_01_T1 -74.70333 41.39106 39.25080
3 LC08_L1TP_013032_20180421_20180502_01_T1 -74.70681 41.39107 39.25098
4 LC08_L1TP_013032_20180710_20180717_01_T1 -74.66854 41.39096 39.24991
5 LC08_L1TP_013032_20180827_20180911_01_T1 -74.67202 41.39097 39.25000
6 LC08_L1TP_013032_20181030_20181115_01_T1 -74.69637 41.39104 39.25062
      right            datetime        srs
1 -71.92546 2018-01-31T00:00:00 EPSG:32618
2 -71.94695 2018-04-05T00:00:00 EPSG:32618
3 -71.95411 2018-04-21T00:00:00 EPSG:32618
4 -71.91114 2018-07-10T00:00:00 EPSG:32618
5 -71.91472 2018-08-27T00:00:00 EPSG:32618
6 -71.93979 2018-10-30T00:00:00 EPSG:32618
[ omitted 13 images ] 

Bands:
   name offset scale unit   nodata image_count
1   B01      0     1      0.000000          19
2   B02      0     1      0.000000          19
3   B03      0     1      0.000000          19
4   B04      0     1      0.000000          19
5   B05      0     1      0.000000          19
6   B06      0     1      0.000000          19
7   B07      0     1      0.000000          19
8   B08      0     1      0.000000          19
9   B09      0     1      0.000000          19
10  B10      0     1      0.000000          19
11  B11      0     1      0.000000          19
12  BQA      0     1                        19