View source: R/mkdeFunctions.R
writeRasterToXDMF | R Documentation |
Write the raster to a XDMF files.
writeRasterToXDMF(rast, fname, nodat="NA")
rast |
A RasterLayer object |
fname |
The path and base file name for output HDF5 files |
nodat |
A no data character string that will be written in place of no data values. |
This function writes XDMF XML wrapper and binary data file.
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
Amit Chourasia, MS
San Diego Supercomputer Center
amit@sdsc.edu
library(terra)
fpath <- system.file("extdata", "condordem.RDS", package="mkde")
condordem <- terra::readRDS(fpath)
# Save as XDMF (notice no file extension in file name)
writeRasterToXDMF(condordem, "condor_dem")
# Clean up files
unlink("condor_dem.dat")
unlink("condor_dem.xdmf")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.