fortifySpatRaster: Fortify method for classes from the terra package.

View source: R/fortify-raster.R

fortifySpatRasterR Documentation

Fortify method for classes from the terra package.

Description

Fortify method for classes from the terra package.

Usage

fortifySpatRaster(x, maxpixels = 50000)

Arguments

x

SpatRaster object to convert into a dataframe.

maxpixels

Integer. Maximum number of pixels to sample

Value

Returns a data.frame with coordinates (x,y) and corresponding raster values.

Examples

r_df <- fortifySpatRaster(rlogo)
head(r_df)

bleutner/RStoolbox documentation built on Nov. 30, 2024, 9:47 p.m.