Skip to contents

Convert raster input to list

Usage

landscape_as_list(landscape)

# S3 method for SpatRaster
landscape_as_list(landscape)

# S3 method for RasterLayer
landscape_as_list(landscape)

# S3 method for RasterBrick
landscape_as_list(landscape)

# S3 method for RasterStack
landscape_as_list(landscape)

# S3 method for stars
landscape_as_list(landscape)

# S3 method for list
landscape_as_list(landscape)

# S3 method for matrix
landscape_as_list(landscape)

# S3 method for numeric
landscape_as_list(landscape)

Arguments

landscape

A categorical raster object: SpatRaster; Raster* Layer, Stack, Brick; stars or a list of SpatRasters

Value

list

Details

Mainly for internal use

Examples

landscape <- terra::rast(landscapemetrics::landscape)
landscape_as_list(c(landscape, landscape))
#> [[1]]
#> class       : SpatRaster 
#> dimensions  : 30, 30, 1  (nrow, ncol, nlyr)
#> resolution  : 1, 1  (x, y)
#> extent      : 0, 30, 0, 30  (xmin, xmax, ymin, ymax)
#> coord. ref. :  
#> source(s)   : memory
#> name        : clumps 
#> min value   :      1 
#> max value   :      3 
#> 
#> [[2]]
#> class       : SpatRaster 
#> dimensions  : 30, 30, 1  (nrow, ncol, nlyr)
#> resolution  : 1, 1  (x, y)
#> extent      : 0, 30, 0, 30  (xmin, xmax, ymin, ymax)
#> coord. ref. :  
#> source(s)   : memory
#> name        : clumps 
#> min value   :      1 
#> max value   :      3 
#>