Adds the raster elements to a dataset list according to EML standards.

add_raster(parent_element, raster_metadata)

Arguments

parent_element

A list representing the EML project or dataset.

raster_metadata

A named list or dataframe containing raster metadata elements (file_name, file_description, attribute_list, physical, spatial_reference, horizontal_accuracy, vertical_accuracy, cell_size_x, cell_size_y, number_of_bands, raster_origin, rows, columns, verticals, cell_geometry): see create_raster

Value

The dataset list or project with raster file information appended.

Examples

 
raster_metadata <- list("file_name" = "Rasterfiles.tif",
                        "file_description" = "A Raster File",
                        "attribute_list" =  create_attribute("attribute_name" = "Yrs", attribute_label = "Years", 
                                                        "attribute_definition" = "Calendar year of the observation from years 1990 - 2010.", 
                                                        "storage_type" = EMLaide::storage_type$date, 
                                                        "measurement_scale" = EMLaide::measurement_scale$dateTime, 
                                                        "date_time_format" = "YYYY",
                                                        "date_time_precision" = "1", minimum = "1993", maximum = "2003"),
                        "physical" = create_physical("Rasterfiles.tif"),
                        "spatial_reference" = "NAD_1983_StatePlane_California_I_FIPS_0401",
                        "horizontal_accuracy" = "No Information",
                        "vertical_accuracy" =  "No Information",
                        "cell_size_x" = "25",
                        "cell_size_y" = "25",
                        "number_of_bands" = "10",
                        "raster_origin" = "Upper Left",
                        "rows" = "200",
                        "columns" = "6",
                        "verticals" = "1",
                        "cell_geometry" = "pixel")
#> Error in create_attribute(attribute_name = "Yrs", attribute_label = "Years",     attribute_definition = "Calendar year of the observation from years 1990 - 2010.",     storage_type = EMLaide::storage_type$date, measurement_scale = EMLaide::measurement_scale$dateTime,     date_time_format = "YYYY", date_time_precision = "1", minimum = "1993",     maximum = "2003"): unused argument (storage_type = EMLaide::storage_type$date)
if (FALSE) {
dataset <- list() %>%
    add_raster(raster_metadata)
dataset
}