Skip to contents

Check input landscape

Usage

check_landscape(landscape, verbose = TRUE)

Arguments

landscape

Raster* Layer, Stack, Brick, Stars or a list of rasterLayers

verbose

Print warning messages.

Value

tibble

Details

This function extracts basic information about the input landscape. It includes a type of coordinate reference system (crs) - either "geographic", "projected", or NA, units of the coordinate reference system, a class of the input landscape's values and the number of classes found in the landscape.

Examples

check_landscape(augusta_nlcd)
#>   layer       crs units   class n_classes OK
#> 1     1 projected     m integer        15  ✔
check_landscape(podlasie_ccilc)
#> Warning: Caution: Coordinate reference system not metric - Units of results based on cellsizes and/or distances may be incorrect.
#>   layer        crs   units   class n_classes OK
#> 1     1 geographic degrees integer        14  ✖
check_landscape(raster::stack(landscape, landscape))
#> Warning: Caution: Coordinate reference system not metric - Units of results based on cellsizes and/or distances may be incorrect.
#> Warning: Caution: Coordinate reference system not metric - Units of results based on cellsizes and/or distances may be incorrect.
#>   layer crs units   class n_classes OK
#> 1     1  NA    NA integer         3  ?⃝
#> 2     2  NA    NA integer         3  ?⃝