Learn R Programming

mrangr (version 1.0.1)

diagonal: Compute Maximum Possible Distance for a Raster Object

Description

Calculates the diagonal length of a raster's extent, accounting for the coordinate reference system.

Usage

diagonal(x)

Value

The diagonal distance in meteres.

Arguments

x

A raster object.

Examples

Run this code
library(terra)

# Read data from the mrangr package
K_map <- rast(system.file("input_maps/K_map_eg.tif", package = "mrangr"))

diagonal(K_map)

Run the code above in your browser using DataLab