create_spatialRaster generates a EML entity of type spatialRaster

create_spatialRaster(
  rasterFile,
  description,
  epsgProjection,
  emlProjection,
  rasterValueDescription,
  rasterValueUnits,
  zipFiles = FALSE,
  geoDescription = "CAP LTER study area",
  baseURL = "https://data.gios.asu.edu/datasets/cap/",
  projectNaming = TRUE
)

Arguments

rasterFile

Quoted full path to raster file.

description

Description of the raster.

epsgProjection

EPSG numeric code of raster's coordinate reference system

emlProjection

EML-compliant refence to raster's coordinate reference system

rasterValueDescription

Description of raster values

rasterValueUnits

Raster value units

zipFiles

Logical indicating whether spatial raster entity should be constructed from a single raster file (FALSE, default) or entire directory (TRUE)

geoDescription

A textual description of the geographic study area of the raster. "CAP LTER study area" is the default.

baseURL

The base path of the web-accessible location of the data file; the name of the resulting file will be passed to the base path to generate a web-resolvable file path. This parameter is required with the default set to the CAP LTER file path

projectNaming

Logical indicating if the raster file (or parent directory if zipFiles == TRUE) should be renamed per the style used by the CAP LTER (default) with the project id + base file name + md5sum + file extension. The passed file or directory name will be used if this parameter is set to FALSE.

Value

EML spatial data object is returned. Additionally, if projectNaming is set to TRUE (default) the spatial data file is renamed with the project id + base file name + md5sum + 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) or a collection of related files (e.g., CAP_1985.img, CAP_1985.img.aux.xml). In the case of multiple files, all files in the parent directory where the raster file is located are aggregated into a single compressed (zipped) file. In all cases, the resulting entity is renamed with the project id + base file name + md5sum + file extension (zip in the case when multiple files are aggregated).

Note

create_spatialRaster will look for a project id in the working environment; this parameter is not passed to the function and it must exist.

Examples

# 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.' # geoDesc <- "one in a series of tiles covering the central-Arizona Phoenix # region" # NAIP_NDVI_2015_SV <- create_spatialRaster(rasterFile = '~/Desktop/NAIP_NDVI_2015.tiff', # description = rasterDesc, # epsgProjection = 4326, # rasterValueDescription = 'Normalized Difference Vegetation Index (NDVI)', # rasterValueUnits = 'dimensionless', # geoDescription = geoDesc, # projectNaming = FALSE)