extractRasterValues: Function: Extract raster values

Description Usage Arguments Note Author(s) See Also Examples

Description

A function to extract cell values from a RasterLayer.

Usage

1

Arguments

rasterLayer

An object of class 'RasterLayer' from which the requested cell values are extracted.

selectedCoordinates

An object of class 'matrix'. Coordinates (x = first column, y = second column) for each location where point values from the RasterLayer are requested.

Note

The projection of the given coordinates and RasterLayer must be the same.

Author(s)

Alexander R. Groos (alexander.groos@giub.unibe.ch)

See Also

cellFrom, extract

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Load the provided data set and RasterLayer as exemplary
# input for the function
data(selectedCoordinates, lst_30m_hourly,
    package = "glacierSMBM")
# Individual data sets should be loaded using the
# functions read.*() or raster(), respectively

# Extract the requested cell values of a RasterLayer based
# on the given coordinates
output <- extractRasterValues(rasterLayer = lst_30m_hourly,
    selectedCoordinates = selectedCoordinates)

glacierSMBM documentation built on May 2, 2019, 3:42 a.m.