Define the spatial extent and resolution of a 3D MKDE and create an 3D MKDE list object for use in other functions in the package.
initializeMKDE3D(xLL, xCellSize, nX, yLL, yCellSize, nY,
zLL, zCellSize, nZ)
A list representing an MKDE object is returned with the following elements:
The dimension of the MKDE; that is, 3.
A grid of points along the x-axis where the voxel centers occur.
A grid of points along the y-axis where the voxel centers occur.
A grid of points along the z-axis where the voxel centers occur.
A 2D array representing the lower bounds of space in the z-dimension at each x and y coordinate. Defaults to a constant value based on the arguments zLL, zCellSize,and nZ.
A 2D array representing the upper bounds of space in the z-dimension at each x and y coordinate. Defaults to a constant value based on the arguments zLL, zCellSize,and nZ.
Number of cells in the x-dimension.
Number of cells in the y-dimension.
Number of cells in the z-dimension.
A 3D array with dimensions (nx, ny, nz) that stores the density. The elements are initialized toNA.
Lower bounds of the grid in the x-dimension
Cell size in the x-dimension
Number of cells in the x-dimension
Lower bounds of the grid in the y-dimension
Cell size in the y-dimension
Number of cells in the y-dimension
Lower bounds of the grid in the z-dimension
Cell size in the z-dimension
Number of cells in the z-dimension
Jeff A. Tracey, PhD
USGS Western Ecological Research Center, San Diego Field Station
jatracey@usgs.gov
James Sheppard, PhD
San Diego Zoo Institute for Conservation Research
jsheppard@sandiegozoo.org
It is strongly recommended that the same value is used for xCellSize
and
yCellSize
. The grid should be defined so that it covers the volume that
the animal used, plus a sufficient buffer so that the density is
negligable beyond the grid.
library(terra)
fpath <- system.file("extdata", "condordem.RDS", package="mkde")
condordem <- terra::readRDS(fpath)
cell.sz <- mean(res(condordem))
ext <- ext(condordem)
nx <- ncol(condordem)
ny <- nrow(condordem)
zmin <- min(values(condordem), na.rm=TRUE)
nz <- 30
mkde.obj <- initializeMKDE3D(ext$xmin, cell.sz, nx, ext$ymin, cell.sz,
ny, zmin, cell.sz, nz)
Run the code above in your browser using DataLab