initializeAreaRaster {mkde} | R Documentation |
Initialize an area raster for a 2.5D MKDE.
Description
Initialize the surface area for a 2.5D MKDE.
Usage
initializeAreaRaster(mkde.obj)
Arguments
mkde.obj |
An MKDE object created using |
Details
After creating the MKDE object and setting the lower bounds in the
z-dimension using setMinimumZfromRaster
, this function computes
the surface area of each raster cell and sets the dimension of the
MKDE object to 2.5.
Value
Returns a 2.5 MKDE object with an initialized area raster.
Author(s)
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
Examples
library(terra)
fpath <- system.file("extdata", "pandadem.RDS", package="mkde")
pandadem <- terra::readRDS(fpath)
cell.sz <- mean(res(pandadem))
ext <- ext(pandadem)
nx <- ncol(pandadem)
ny <- nrow(pandadem)
mkde.obj <- initializeMKDE2D(ext$xmin, cell.sz, nx, ext$ymin, cell.sz, ny)
mkde.obj <- setMinimumZfromRaster(mkde.obj, pandadem)
mkde.obj <- initializeAreaRaster(mkde.obj)
[Package mkde version 0.3 Index]