get_points: get_points

View source: R/prepare_extras.R

get_pointsR Documentation

get_points

Description

Raster to col, row, value

Usage

get_points(landscape_mat, resolution)

Arguments

landscape_mat

A matrix object

resolution

A vector with two numbers (usually calculated using terra::res)

Details

The col and row values are multiplied by the resolution to get the (internal) coordinates of the points.

Value

matrix with three columns: col, row, value

Examples

landscape <- terra::rast(landscapemetrics::landscape)
landscape_mat <- terra::as.matrix(landscape, wide = TRUE)
resolution <- terra::res(landscape)
get_points(landscape_mat, resolution)


landscapeecology/landscapemetrics documentation built on April 7, 2024, 11:11 p.m.