Learn R Programming

clc (version 1.0.0)

get_raster: Retrieve a Raster Representation of CLC

Description

Retrieve a raster representation (`terra::SpatRaster`) from a CLC object.

Usage

get_raster(clo)

# S3 method for clc_raster get_raster(clo)

Value

A `terra::SpatRaster` object.

Arguments

clo

A `clc_raster` object.

See Also

Other CLC class functions: as_raster(), clc(), copy_to(), cut_to_extent(), get_colors.clc(), get_levels.clc(), plot_clc(), prepare_plot(), save_to()

Examples

Run this code
source_gpkg <- system.file("extdata", "clc.gpkg", package = "clc")
clo <- clc(source = source_gpkg, layer_name = "clc")

r <- clo |>
     as_raster(resolution = 50)

clc_r <- r |>
         get_raster()

Run the code above in your browser using DataLab