| Title: | Compute Energy Landscapes |
|---|---|
| Description: | Compute energy landscapes using a digital elevation model and body mass of animals. |
| Authors: | Emilio Berti [aut, cre], Marco Davoli [ctb], Robert Buitenwerf [ctb], Alexander Dyer [ctb], Oskar L.P. Hansen [ctb], Myriam Hirt [ctb], Jens-Christian Svenning [ctb], Joerdis F. Terlau [ctb], Ulrich Brose [ctb], Fritz Vollrath [ctb] |
| Maintainer: | Emilio Berti <[email protected]> |
| License: | GPL-3 |
| Version: | 1.2.0 |
| Built: | 2026-05-17 07:31:49 UTC |
| Source: | https://github.com/emilio-berti/enerscape |
This creates the init file for the julia package Circuitscape: https://juliapackages.com/p/circuitscape.
circuitscape_skeleton(en = NULL, path = NULL, points = NULL)circuitscape_skeleton(en = NULL, path = NULL, points = NULL)
en |
an enerscape object. |
path |
full path where to write the .ini file. |
points |
data.frame with origin and destination coordinates. |
Nothing, only write the circuitscape.ini file to disk.
Spatial distances
distances(x, center, res)distances(x, center, res)
x |
matrix with values |
center |
numeric value (double) with the value of the focal cell |
res |
numeric value (double) of the spatial resolution of the matrix |
Vector with values the distances between x and center
Energy Landscape
energy(mass, slope, distance, res, kcal)energy(mass, slope, distance, res, kcal)
mass |
body mass of species (kg) |
slope |
vector with slopes |
distance |
vector with distances |
res |
numeric value (double) of the spatial resolution of the matrix |
kcal |
(boolean) if to return the result in kCal (true) or J (false) |
Vector with the energy cost of locomotion (EnergyScape)
Energy Landscape for walking people
energyHuman(mass, v, slope, distance, res, kcal)energyHuman(mass, v, slope, distance, res, kcal)
mass |
body mass of species (kg) |
v |
speed |
slope |
vector with slopes |
distance |
vector with distances |
res |
numeric value (double) of the spatial resolution of the matrix |
kcal |
(boolean) if to return the result in kCal (true) or J (false) |
Vector with the energy cost of locomotion (EnergyScape)
Energy Landscape
energyscape(x, mass, n, res, kcal)energyscape(x, mass, n, res, kcal)
x |
matrix with values the elevation. |
mass |
body mass of species (kg). |
n |
(integer) number of neighbours to consider (either 4 or 8). |
res |
numeric value (double) of the spatial resolution of the matrix. |
kcal |
(boolean) if to return the result in kCal (true) or J (false). |
Matrix with the energy cost of locomotion (EnergyScape).
Energy Landscape
energyscapeHuman(x, mass, v, n, res, kcal)energyscapeHuman(x, mass, v, n, res, kcal)
x |
matrix with values the elevation. |
mass |
body mass of species (kg). |
v |
speed |
n |
(integer) number of neighbours to consider (either 4 or 8). |
res |
numeric value (double) of the spatial resolution of the matrix. |
kcal |
(boolean) if to return the result in kCal (true) or J (false). |
Matrix with the energy cost of locomotion (EnergyScape).
This is the main function to compute energy landscapes from a digital elevation model and body mass of animals based on the model from Pontzer (2016).
enerscape(dem, m, unit = "joule", neigh = 8)enerscape(dem, m, unit = "joule", neigh = 8)
dem |
raster file of the digital elevation model, either a raster or a full path location of the file. |
m |
species body mass (kg). |
unit |
if joules ('joule') or kilocalories ('kcal'). |
neigh |
number of neighbor cells that are connected together. |
EnergyScape raster.
Pontzer, H. (2016). A unified theory for the energy cost of legged locomotion. Biology Letters, 12(2), 20150935. doi:10.1098/rsbl.2015.0935.
library(terra) library(enerscape) data("volcano") dem <- rast(volcano) en <- enerscape(dem, 10, unit = "kcal", neigh = 16)library(terra) library(enerscape) data("volcano") dem <- rast(volcano) en <- enerscape(dem, 10, unit = "kcal", neigh = 16)
This is the main function to compute energy landscapes from a digital elevation model, body mass of a person, and walking speed from Looney et al. (2019).
humanscape(dem, m, v = 1.39, unit = "joule", neigh = 8)humanscape(dem, m, v = 1.39, unit = "joule", neigh = 8)
dem |
raster file of the digital elevation model, either a raster or a full path location of the file. |
m |
species body mass (kg). |
v |
walking speed (m/s). |
unit |
if joules ('joule') or kilocalories ('kcal'). |
neigh |
number of neighbor cells that are connected together. |
EnergyScape raster.
Looney, D. P., Santee, W. R., Hansen, E. O., Bonventre, P. J., Chalmers, C. R., & Potter, A. W. (2019). Estimating energy expenditure during level, uphill, and downhill walking. Med. Sci. Sports Exerc., 51(9), 1954-1960. doi:10.1249/MSS.0000000000002002.
library(terra) library(enerscape) data("volcano") dem <- rast(volcano) en <- humanscape(dem, 10, 1, unit = "kcal", neigh = 16)library(terra) library(enerscape) data("volcano") dem <- rast(volcano) en <- humanscape(dem, 10, 1, unit = "kcal", neigh = 16)
Neighbours
neighbours(i, j, n, x)neighbours(i, j, n, x)
i |
row index |
j |
column index |
n |
number of neighbours (4 or 8) |
x |
matrix with values |
Vector with values the neighours of x
This creates the init file for the julia package Omniscape: https://juliapackages.com/p/omniscape.
omniscape_skeleton(en = NULL, path = NULL, radius = NULL, aggr_fact = 1)omniscape_skeleton(en = NULL, path = NULL, radius = NULL, aggr_fact = 1)
en |
an enerscape object. |
path |
full path where to write the .ini file. |
radius |
radius in pixels of the moving window. |
aggr_fact |
the block size to compute the Omniscape. |
Nothing, only write the omniscape.ini file to disk.
Energy cost of transport from Pontzer (2016)
pontzerpontzer
A data frame with 92 rows and 5 variables:
species name
incline of movement
species body mass
cost of transport
original source of data
#' Pontzer, H. (2016). A unified theory for the energy cost of legged locomotion. Biology Letters, 12(2), 20150935.
A matrix with the digital elevation mode of the Monte Sirente (Central Italy).
sirentesirente
An object of class matrix (inherits from array) with 393 rows and 594 columns.
Slopes
slope(x, center, res)slope(x, center, res)
x |
matrix with values |
center |
numeric value (double) with the value of the focal cell |
res |
numeric value (double) of the spatial resolution of the matrix |
Vector with values the slopes (degrees) between x and center
Slopes in radians
slopeRadiant(x, center, res)slopeRadiant(x, center, res)
x |
matrix with values |
center |
numeric value (double) with the value of the focal cell |
res |
numeric value (double) of the spatial resolution of the matrix |
Vector with values the slopes (degrees) between x and center