Description Usage Arguments Details Value Examples
View source: R/create_raster_metadata.R
This function writes an XML file containing the information on the extent,
projection, and dimensions of the input dataset. This is designed to be an
alternative for the template
argument for other functions.
1 | create_raster_metadata(data_layers, output_file)
|
data_layers |
A Raster object for which metadata will be created. |
output_file |
A character file path to the XML file to which the metadata will be written. |
The information in the XML file does not create an exactly identical raster
in terms of extent and resolution compared to the original input raster, most
likely because of infinite precision issues. In other words, testing the
extent and resolution of a raster created from the XML file and the original
raster with identical()
yields FALSE
. However, testing them
with all.equal()
, which allows for small numerical differences, yields
TRUE
. It is likely that this is not a major problem because the
raster
package still performs map algebra without issue. However, this
has not yet been tested in ArcGIS (and may apprently be remedied with the
Snap Raster environment setting if it is a problem). For all display
purposes, the rasters may be considered as exactly identical.
Nothing. This function has a side-effect of writing to a file.
1 2 3 4 | ## Not run:
create_raster_metadata(mod.brick, "C:/Desktop/metadata.xml")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.