extract_from_external_raster_old: Function to extract data for raster cells

Description Usage Arguments Value See Also

View source: R/Spatial_Functions.R

Description

This function is slow because of the call to resample. The result is also too smooth because of 'two' smoothing steps: (i) aggregation and (ii) 'bilinear' resampling method.

Usage

1

Arguments

x

A raster::RasterLayer object for which !NA cells, values of data are resampled and extracted

data

A raster::Raster object from which data are extracted

...
method

A character string. The method used to resample values for the new raster::RasterLayer, should be “bilinear” for bilinear interpolation, or “ngb” for using the nearest neighbor.

coords

points represented by a two-column matrix or data.frame, or sp::SpatialPoints; sp::SpatialPolygons; sp::SpatialLines; raster::Extent; or a numeric vector representing cell numbers.

crit_v_exclude

A character string representing a logical expression based on a variable named 'v'. If present, then the condition(s) are applied to data before resampling.

Value

A vector or matrix with length/rows corresponding to the !NA cells of x and columns to layers of data.

See Also

extract


Burke-Lauenroth-Lab/rSFSW2 documentation built on Aug. 14, 2020, 5:20 p.m.