extract_raster_prop: Extract the proportion of a landcover class buffered around a...

View source: R/spatial_utilities.R

extract_raster_propR Documentation

Extract the proportion of a landcover class buffered around a point

Description

Given a set of locations and a raster, this function will calculate the proportion of each landcover class specified in the argument lulc_cats.

Usage

extract_raster_prop(
  my_points,
  location_column,
  my_buffer,
  my_raster_data,
  lulc_cats = NULL
)

Arguments

my_points

a spatial points data.frame that contains the locations you wish to summarize landcover data at.

location_column

the name of the column in my_points that specifies the names of each location. Can either be the column name or an integer that specifies it's column location.

my_buffer

The radius of a buffer around each point form which

my_raster_data

A SpatRaster object that you want to extract data from.

lulc_cats

Land-use land-cover categories. If this is a numeric then the data will be queried to return just those specific lulc categories (e.g., lulc_cats = c(1,2)) will return the first two categories. If this is a list then each element must be a numeric vector. If the numeric vector is > 1 for a specific list element then those categories will be summed together. This may be done to combine specific similar category types (e.g., combine 'building', 'road', and 'other paved surfaces') to generate an impervious surface category. The numeric or the list can be named. If they are then those names will be added to the returned object. If NULL, then all categories will be returned.


mfidino/uwinspatialtools documentation built on May 2, 2024, 8:12 a.m.