spectrify {gecko}R Documentation

Make a raster layer SPECTRE compatible

Description

Transform a given raster object to the resolution, datum, projection and extent used in SPECTRE.

Usage

spectrify(layers, continuous = TRUE, filepath = NULL)

Arguments

layers

SpatRaster. A raster object that you would like to be SPECTRE compatible.

continuous

logical. Whether the data present in layers is continuous. If TRUE bilinear interpolation will be used in the case of resampling and reprojection. if FALSE nearest neighbour will be used instead. See terra::resample() for more information on interpolation methods.

filepath

character. Optional file path to where the final raster layer should be saved, in the format "folder/file.tif". If filepath is NULL your layer will be saved to your current working directory.

Value

SpatRaster.

Examples

## Not run: 
# For the sake of demonstration we will transform our raster layer "range".
distribution = gecko.data("range")
standard_dist = spectrify(distribution)
terra::plot(standard_dist)

## End(Not run)

[Package gecko version 1.0.0 Index]