create_spatialRaster generates a EML entity of type spatialRaster

create_spatialRaster(
  raster_file,
  description,
  epsg,
  raster_value_description,
  raster_value_units,
  geographic_description = NULL,
  project_naming = FALSE,
  file_url = NULL
)

Arguments

raster_file

(character) Quoted full path to raster file.

description

(character) Description of the raster.

epsg

(integer) Four- or five-digit EPSG numeric code of raster Coordinate Reference System (CRS)

raster_value_description

(character) Description of raster values

raster_value_units

(character) Raster value units. Units must be EML-compliant or annotated by a custom unit definition. This argument is ignored for categorical values (i.e., as indicated by a corresponding `_factors.yaml` file).

geographic_description

(character) A textual description of the geographic study area of the raster. This parameter allows the user to overwrite the study-wide geographic_description value provided in config.yaml (default).

project_naming

(logical) Logical indicating if the raster file should be renamed per the style: project id + base file name + file extension. If true, create_spatialRaster will look for a package identifer in config.yaml.

file_url

(character) Optional parameter detailing the online location where the data entity can be accessed. In most cases, the online location is the same for all files in the dataset and is detailed in config.yaml. file_url allows the user to overide project-level configuration in config.yaml and provide a specific, unique resource (e.g., a link to a file in Dropbox) for each data entity.

Value

EML spatial data object is returned. Additionally, if project_naming is set to TRUE the spatial data file is renamed with the project id + base file name + file extension (zip in the case when multiple files are aggregated).

Details

a spatialRaster entity is created from a single data file (e.g., CAP_1985.img). The resulting entity is renamed with the project id + base file name + file extension or base file name + file extension depending on desired output.

Note

EML requires that geographic extents are provided as decimal degrees. Because it is often impractical or inadviseable to change the projection of rasters, a spatial coverage is not constructed if the projection of a raster is in units of meters.

Examples

if (FALSE) {

rasterDesc <- "NDVI for the central Arizona region derived from 2015 NAIP
imagery. NAIP NDVI data are presented as a series of tiles each representing
a portion of the overall central Arizona coverage area. The relative position
of this tile to the entire coverage area is detailed in the files
NAIP_GRID.kml, NAIP_GRID.pdf, and NAIP_GRID.png included with this data set."

my_area <- "one in a series of tiles covering the central-Arizona Phoenix
region" # supercedes yaml

NAIP_NDVI_2015_SV <- capemlGIS::create_spatialRaster(
   raster_file               = "path-to-file/NAIP_NDVI_2015.tiff",
   description               = rasterDesc,
   epsg                      = 4326,
   raster_value_description  = "Normalized Difference Vegetation Index (NDVI)",
   raster_value_units        = "dimensionless",
   geographic_description    = "my_area",
   project_naming            = FALSE
 )

}