powered by
Convert matrix to raster
matrix_to_raster( matrix, landscape = NULL, landscape_empty = FALSE, extent = NULL, resolution = NULL, crs = NULL, to_disk = getOption("to_disk", default = FALSE) )
raster
matrix with values.
RasterLayer.
If true, RasterLayer is landscape_empty
Extent of RasterLayer.
Resolution of RasterLayer.
CRS of raster layer.
If TRUE raster will be saved to disk.
Converts matrix to a raster with same characteristics as landscape. Either landscape or extent, resolution and crs must be specified.
matrix
landscape
extent
resolution
crs
test_matrix <- raster::as.matrix(augusta_nlcd) matrix_to_raster(matrix = test_matrix, landscape = augusta_nlcd)
Run the code above in your browser using DataLab