Skip to contents

This function allows get_friction_surface() to accept the argument extent as a vector, 2x2 matrix, SpatVector, or SpatRaster and extracts and converts into the annoyingly specific format necessary to download the friction surface. See details in ?get_friction_surface

Usage

ext_matrix(extent)

Arguments

extent

vector of length 4, 2x2 matrix, SpatVector, or SpatRaster

Value

2x2 matrix with column names "x" and "y" and row names "min" and "max

Examples

ext_matrix(c(111,112,0, 1))
#>   min max
#> x 111 112
#> y   0   1