AddLandscapeValues: Adds landscape data to dataframe

Description Usage Arguments Details Value

View source: R/gis.R

Description

Adds the cell values from a list of landscape rasters to an input locations dataset, usually a subset of BAEA.

Usage

1
AddLandscapeValues(df, raster_stack, long, lat, clean_up)

Arguments

df

dataframe of location data

raster_stack

a RasterStack of landscape data

long

column name of longitude data, default = lat_utm

lat

column name of latitude data, default = long_utm

clean_up

logical, will run a series of steps to clean up the returned output (e.g. removing "_30mc" from column names and deleting unneeded landcover "definition" column).

Details

The locations dataset and rasters should have the same CRS, otherwise function stops and returns an error message.

Value

The original locations df with additional landscape data columns.


Blakemassey/gisr documentation built on Aug. 30, 2020, 12:14 a.m.