View source: R/mkdeFunctions.R
initializeAreaRaster | R Documentation |
Initialize the surface area for a 2.5D MKDE.
initializeAreaRaster(mkde.obj)
mkde.obj |
An MKDE object created using |
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.
Returns a 2.5 MKDE object with an initialized area raster.
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
library(raster)
data(pandadem)
cell.sz <- mean(res(pandadem))
ext <- extent(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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.