View source: R/prepare_extras.R
get_points | R Documentation |
Raster to col, row, value
get_points(landscape_mat, resolution)
landscape_mat |
A matrix object |
resolution |
A vector with two numbers (usually calculated using terra::res) |
The col and row values are multiplied by the resolution to get the (internal) coordinates of the points.
matrix with three columns: col, row, value
landscape <- terra::rast(landscapemetrics::landscape)
landscape_mat <- terra::as.matrix(landscape, wide = TRUE)
resolution <- terra::res(landscape)
get_points(landscape_mat, resolution)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.