deselectLocationsOutsideBounds {mkde} | R Documentation |
Flag 3D locations with out-of-bounds z-coordinates
Description
For a 3D MKDE object and 3D location data, the z-coordinates in the location data are checked to make sure they are within the lower and upper bounds specified in the MKDE list object.
Usage
deselectLocationsOutsideBounds(move.dat, mkde.obj)
Arguments
move.dat |
A move data object created with |
mkde.obj |
An MKDE object created with |
Details
If a 2D or 2.5D MDKE object is passed as an argument, no change is made
to the movement data list object. If a 3D MKDE list object is passed as
an argument, the z-coordinates in the movement data are checked to
determine if they are in range. If they are not, the corresponding
value in move.dat$use.obs is set to FALSE. Note that this function is
not called within initialzeDensity
. If you want to exclude locations
because they are outside of the allowed range in the z-dimension, this
function must be used before computing the density.
Value
An updated move data list object is returned.
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)
data(condor)
mv.dat <- initializeMovementData(condor$time, condor$x, condor$y,
z.obs=condor$z, sig2obs=25.0, sig2obs.z=81.0, t.max=65.0)
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)
mkde.obj <- initializeMKDE3D(ext$xmin, cell.sz, nx, ext$ymin, cell.sz,
ny, min(values(condordem), na.rm=TRUE), 30.0, 100)
mkde.obj <- setMinimumZfromRaster(mkde.obj, condordem)
mv.dat <- deselectLocationsOutsideBounds(mv.dat, mkde.obj)