View source: R/mkdeFunctions.R
writeObservedLocationVTK | R Documentation |
Write the observed points to a VTK file.
writeObservedLocationVTK(move.dat, mkde.obj, description, filename, control)
move.dat |
A move data object created with |
mkde.obj |
An MKDE object created with |
description |
A text description for the file header |
filename |
A string for the path and file name |
control |
A list for finer control |
Writes 3D points for observed locations for move steps. Currently, the
list argument control only has one element z.scale
used to scale the
z-coordinates.
No value is returned
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(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)
writeObservedLocationVTK(mv.dat, mkde.obj,
"Example California condor locations", "condor_locations.vtk")
# Clean up files
unlink("condor_locations.vtk")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.